]> git.sesse.net Git - stockfish/commit
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)
commit0412f4a1ee1b738441490dd6f3d324c21ee75987
tree96ab78ffbca3578503f3ce540d353c727fa7ca07
parent6828325881eb823ddfb2e6ea72122c3a4576d240
Fix an issue when adding a book during the game

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>
src/book.cpp