Closed maddin200 closed 6 years ago
Goodness me, you are completely correct of course. This is part of a line that is supposed to abort a game search if the position we are searching for has a home row black pawn (on squares a7 to h7) and during the game such a pawn moves (one square forward) - meaning that of course the game can never reach the target position. There are 8 lines of code like this - for each of black and white single pawn advance, double pawn advance, left capture and right capture. Only the black pawn, one square forward version has the bug.
The consequence of this is a small but significant performance penalty in the search. Fortunately the search results are unaffected.
Thank you very much for reporting this. In 2015 I made an effort to get to zero warnings (with MSVC compilers) and am surprised that this wasn't picked up by my compiler.
I will incorporate a fix into the next version.
Finally closing with pre-release V3.06a
\src\MemoryPositionSearch.cpp line 1743
if( 8<=src && src<6
should be probably: (src < 16)