daylen / stockfish-mac

Beautiful, powerful chess app for the Mac
http://stockfishchess.org/mac/
GNU General Public License v3.0
511 stars 116 forks source link

Incorrect Pawn Promotion query #29

Closed mbrna closed 7 years ago

mbrna commented 7 years ago

Using version 2.0.4 (21), in this position: q5k1/5p2/p5pp/3bp1b1/Pp1n4/1P1P1P1P/2rN2P1/1NBQR1K1 w Kk - 0 1

If White selects the king for a move, the program shows that the white king can move to where he currently sits (in addition to his 4 possible moves), AND if the king moves to h1 the program offers pawn promotion?!?

Note that if the following FEN is loaded: q5k1/5p2/p5pp/3bp1b1/Pp1n4/1P1P1P1P/2rN2P1/1NBQR1K1 w - - 0 1

the program behaves correctly.

daylen commented 7 years ago

The first FEN is invalid (the white king has left its original square so there shouldn't be any castling rights) so the behavior is undefined.