Fix book name is hard coded as book.bin
authorMarco Costalba <mcostalba@gmail.com>
Fri, 18 Dec 2009 09:11:50 +0000 (10:11 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 18 Dec 2009 09:11:50 +0000 (10:11 +0100)
Instead should be read by the corresponding UCI
option "Book File".

Bug reported and fixed by Justin Blanchard (Arch Linux)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 4481cfc727e436b8888825c94ec4bc99d261b21e..409ad20afca6c2bea6f64cdea1b4566975bcb395 100644 (file)
@@ -373,7 +373,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
   {
       Move bookMove;
       if (get_option_value_string("Book File") != OpeningBook.file_name())
   {
       Move bookMove;
       if (get_option_value_string("Book File") != OpeningBook.file_name())
-          OpeningBook.open("book.bin");
+          OpeningBook.open(get_option_value_string("Book File"));
 
       bookMove = OpeningBook.get_move(pos);
       if (bookMove != MOVE_NONE)
 
       bookMove = OpeningBook.get_move(pos);
       if (bookMove != MOVE_NONE)