Fix a warning under MSVC
[stockfish] / src / position.cpp
index 50bb8e18f2c8e0e173f8e0e5deca5d66fb079082..004d6994731ca106e0dd3d7afd6fb5f5b31fd719 100644 (file)
@@ -1448,13 +1448,13 @@ bool Position::is_draw() const {
 
   if (CheckRepetition)
   {
-      int i = 4, e = std::min(st->rule50, st->pliesFromNull);
+      int i = 4, e = std::min(st->rule50, st->pliesFromNull), cnt;
 
       if (i <= e)
       {
           StateInfo* stp = st->previous->previous;
 
-          for (int cnt = 0; i <= e; i += 2)
+          for (cnt = 0; i <= e; i += 2)
           {
               stp = stp->previous->previous;