mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 08:36:33 +08:00
Remove last use of uip.eof()
Value of uip.eof() should not be trusted. input like "go infinite searchmoves " (note space in the end of line) causes problems. Check the return value of (uip >> token) instead Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
committed by
Marco Costalba
parent
cf9bf4e58f
commit
87303d7ed3
@@ -292,11 +292,9 @@ namespace {
|
||||
else if (token == "searchmoves")
|
||||
{
|
||||
int numOfMoves = 0;
|
||||
while (!uip.eof())
|
||||
{
|
||||
uip >> token;
|
||||
while (uip >> token)
|
||||
searchMoves[numOfMoves++] = move_from_string(RootPosition, token);
|
||||
}
|
||||
|
||||
searchMoves[numOfMoves] = MOVE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user