The loop over game history to remake the moves upto the desired position
was incrementing moveNr, but the RootMakeMove() it called already did that
too. With as a result that only white moves were replayed.
int last;
stm = Setup(NULL); // uses FEN saved during previous Setup
last = moveNr - n; if(last < 0) last = 0;
- for(moveNr=0; moveNr<last; moveNr++) RootMakeMove(gameMove[moveNr]);
+ for(moveNr=0; moveNr<last; ) RootMakeMove(gameMove[moveNr]);
}
void PrintResult(int stm, int score)