]> git.sesse.net Git - stockfish/commitdiff
Drop a magic in book.cpp
authorMarco Costalba <mcostalba@gmail.com>
Sat, 22 Sep 2012 09:08:10 +0000 (11:08 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 22 Sep 2012 09:19:10 +0000 (11:19 +0200)
Mask out move's spacial flags without relying
on internal Move representation.

No functional change.

src/book.cpp

index b7237054723a7ab86469309625e21c861e63f2dc..1c2d30e0a41df95358a23cd9bdf1b8ace8944315 100644 (file)
@@ -440,7 +440,7 @@ Move PolyglotBook::probe(const Position& pos, const string& fName, bool pickBest
 
   // Add 'special move' flags and verify it is legal
   for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)
 
   // Add 'special move' flags and verify it is legal
   for (MoveList<LEGAL> ml(pos); !ml.end(); ++ml)
-      if (move == (ml.move() & 0x3FFF))
+      if (move == (ml.move() ^ type_of(ml.move())))
           return ml.move();
 
   return MOVE_NONE;
           return ml.move();
 
   return MOVE_NONE;