]> git.sesse.net Git - stockfish/commit
Fix a bogus assert in allows()
authorMarco Costalba <mcostalba@gmail.com>
Fri, 30 Aug 2013 14:40:11 +0000 (16:40 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 30 Aug 2013 14:42:18 +0000 (16:42 +0200)
commit3e4dcaa06e7fd555628f1c3a65f4b7967d9708cd
treec365bdfde73e1cc9bbd9a2eedca00ba27ac3e62f
parent14f47c8ac6a77b9638008a9b61009dd6852be4d6
Fix a bogus assert in allows()

Becuase castle is coded as "king captures the rook"
the to_sq(move), A1/8 or H1/8 is empty after the move,
leading to assert assert(p != NO_PIECE) in color_of().

Teach allows() asserts about castle and fix the crash.

Bug reported by Ryan Takker and tracked down by Tom Vijlbrief.

No functional change.
src/search.cpp