]> git.sesse.net Git - stockfish/commitdiff
Fix an issue when adding a book during the game
authorMarco Costalba <mcostalba@gmail.com>
Sun, 27 May 2012 13:13:14 +0000 (14:13 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 27 May 2012 13:13:14 +0000 (14:13 +0100)
Currently when we fail to open a book file, for instance
if it doesn't exsist, we leave Book::open() with ifstream
failbit set. If then the book file is added, we correctly
open it at next attempt, but failbit is still set so that
after opening we exit because ifstream::good() returns false.

The fix is to reset failbit upon exiting.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found