diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-27 08:20:32 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-01-27 08:20:32 +0100 |
| commit | e24ebe013870ce447594768e4bd621420d809578 (patch) | |
| tree | 4dc1cc772ce8de11956e34f260b823a82d482e85 | |
| parent | 3fb48d4f29ec54c991a1756c95354f0cbd5371e9 (diff) | |
Debug parser
| -rw-r--r-- | src/PGN.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/PGN.cpp b/src/PGN.cpp index 3f30c4e..e82179f 100644 --- a/src/PGN.cpp +++ b/src/PGN.cpp @@ -190,11 +190,11 @@ loctype PGN::ParseHalfMove(loctype loc, HalfMove *hm) { } hm->move = move; + // Parse Comments, Variations and NAG loc = GotoNextToken(loc); EOF_CHECK(loc); c = pgn_content[loc]; - - while (c == '{' || c == '$' || c == '(' || c == ';' || c == '%') { + while (c == '{' || c == '$' || c == '(') { if (c == '{') { // Parse comment loc = ParseComment(loc, hm); @@ -236,9 +236,6 @@ loctype PGN::ParseHalfMove(loctype loc, HalfMove *hm) { } // Skip end of variation - loc = GotoNextToken(loc); - EOF_CHECK(loc); - c = pgn_content[loc]; if (c == ')') { return (loc); } @@ -332,7 +329,7 @@ loctype PGN::GotoNextToken(loctype loc) { } c = pgn_content[loc]; if (c == '%' || c == ';') { - loc = GotoEOL(loc); + loc = GotoEOL(loc)+1; if (IS_EOF) { return (loc); } |
