]> git.sesse.net Git - stockfish/commitdiff
Do not make any assumption on the move in move_is_legal()
authorMarco Costalba <mcostalba@gmail.com>
Thu, 6 Jan 2011 12:33:40 +0000 (13:33 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 6 Jan 2011 12:33:40 +0000 (13:33 +0100)
We must be able to filter out also moves where move_is_ok()
is false.

And actually we are. Tested on all the default position injecting
a number from -1000000 to 1000000 casted to a Move.

No functional change.

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

index 0f3e4ddb203f3b57db2812a4b04efc94ca58109c..8f0a825f0b95dae0c3175293abd5479445c38de8 100644 (file)
@@ -386,7 +386,6 @@ bool move_is_legal(const Position& pos, const Move m) {
 bool move_is_legal(const Position& pos, const Move m, Bitboard pinned) {
 
   assert(pos.is_ok());
-  assert(move_is_ok(m));
   assert(pinned == pos.pinned_pieces(pos.side_to_move()));
 
   Color us = pos.side_to_move();