fix incorrect error value when a move string is too long in a PGN

Wed, 04 Jun 2025 23:58:05 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 04 Jun 2025 23:58:05 +0200
changeset 81
82d3b044aa69
parent 80
b980a7192b5a
child 82
e75865d90111

fix incorrect error value when a move string is too long in a PGN

src/chess/pgn.c file | annotate | diff | comparison | revisions
--- a/src/chess/pgn.c	Wed Jun 04 23:56:40 2025 +0200
+++ b/src/chess/pgn.c	Wed Jun 04 23:58:05 2025 +0200
@@ -116,7 +116,7 @@
         do {
             movestr[i++] = c;
             if (i >= 10) {
-                return 1;
+                return pgn_error_move_syntax;
             }
         } while (!isspace(c = fgetc(stream)));
         movestr[i] = '\0';

mercurial