src/chess/pgn.c

changeset 163
2a6d83f4677e
parent 150
7d57a252948e
--- a/src/chess/pgn.c	Thu Jul 30 18:34:15 2026 +0200
+++ b/src/chess/pgn.c	Thu Jul 30 19:17:38 2026 +0200
@@ -147,11 +147,12 @@
             }
         } while (!isspace(c = *(pgndata++)));
         movestr[i] = '\0';
-        if (eval_move(gamestate, movestr, &move, curcol)
+        if (eval_move(gamestate, movestr, curcol, &move)
                 != VALID_MOVE_SYNTAX) {
             return(pgn_error_move_syntax);
         }
-        if (validate_move(gamestate, &move) != VALID_MOVE_SEMANTICS) {
+        int move_validate_result = validate_move(gamestate, &move);
+        if (move_validate_result != VALID_MOVE_SEMANTICS) {
             return(pgn_error_move_semantics);
         }
         apply_move(gamestate, &move);

mercurial