src/chess/pgn.c

changeset 133
c58ae152733e
parent 132
5762f2b5f87a
--- a/src/chess/pgn.c	Sun Jun 07 16:56:22 2026 +0200
+++ b/src/chess/pgn.c	Fri Jun 12 13:34:35 2026 +0200
@@ -272,9 +272,8 @@
     } else if (gamestate->bresign) {
         result = "1-0";
     } else if (gamestate->checkmate) {
-        if (gamestate->movecount > 0) {
-            result = (last_move(gamestate).piece & COLOR_MASK) == WHITE ?
-                "1-0" : "0-1";
+        if (current_color(gamestate) == BLACK) {
+            result = "1-0";
         } else {
             result = "0-1";
         }

mercurial