1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

Chess: On pgn import avoid losing piece promotion info

Fixes #13268
This commit is contained in:
Simon Danner 2022-03-26 17:04:48 +01:00 committed by Linus Groh
parent 1888e60015
commit 90fc28152b
Notes: sideshowbarker 2024-07-17 16:43:13 +09:00

View file

@ -165,7 +165,7 @@ Move Move::from_algebraic(StringView algebraic, const Color turn, const Board& b
}
return IterationDecision::Continue;
} else {
if (board.get_piece(square).type == move.piece.type && board.is_legal(Move(square, move.to), turn)) {
if (board.get_piece(square).type == move.piece.type && board.is_legal(Move(square, move.to, move.promote_to), turn)) {
move.from = square;
return IterationDecision::Break;
}