From 90fc28152bde11fa96a98b9cced21dc2678fd62c Mon Sep 17 00:00:00 2001 From: Simon Danner Date: Sat, 26 Mar 2022 17:04:48 +0100 Subject: [PATCH] Chess: On pgn import avoid losing piece promotion info Fixes #13268 --- Userland/Libraries/LibChess/Chess.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }