Forráskód Böngészése

Chess: On pgn import avoid losing piece promotion info

Fixes #13268
Simon Danner 3 éve
szülő
commit
90fc28152b
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Userland/Libraries/LibChess/Chess.cpp

+ 1 - 1
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;
             }