diff options
author | Simon Danner <danner.simon@gmail.com> | 2022-03-26 17:04:48 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-03-26 18:30:12 +0000 |
commit | 90fc28152bde11fa96a98b9cced21dc2678fd62c (patch) | |
tree | a760c1fdc5a77e1ee575d61ba670439c0f889467 /Userland/Libraries/LibChess | |
parent | 1888e600159bc968189e11f01437fb0155642d9d (diff) | |
download | serenity-90fc28152bde11fa96a98b9cced21dc2678fd62c.zip |
Chess: On pgn import avoid losing piece promotion info
Fixes #13268
Diffstat (limited to 'Userland/Libraries/LibChess')
-rw-r--r-- | Userland/Libraries/LibChess/Chess.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibChess/Chess.cpp b/Userland/Libraries/LibChess/Chess.cpp index e50ec108fc..6d56ecd1f0 100644 --- a/Userland/Libraries/LibChess/Chess.cpp +++ b/Userland/Libraries/LibChess/Chess.cpp @@ -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; } |