From 0258e7d4f8dca70aee8d992b68b9fe587c7a7811 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 27 Jan 2022 14:26:09 +0100 Subject: Debug and update readme --- src/PGN.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/PGN.cpp') diff --git a/src/PGN.cpp b/src/PGN.cpp index 0f15fb3..dcc0661 100644 --- a/src/PGN.cpp +++ b/src/PGN.cpp @@ -59,6 +59,10 @@ void PGN::ParseNextGame() { } else if (IS_DIGIT(c)) { LastGameEndLoc = ParseHalfMove(loc, moves); break; + } else if (c == '*') { + result = "*"; + LastGameEndLoc=loc+1; + break; } else if (c == '{') { loc = ParseComment(loc, moves); continue; // No need loc++ @@ -330,11 +334,10 @@ loctype PGN::GotoNextToken(loctype loc) { c = pgn_content[loc]; if (c == '%' || c == ';') { loc = GotoEOL(loc); - if(!IS_EOF){ - c=pgn_content[loc]; - } - else{ - return(loc); + if (!IS_EOF) { + c = pgn_content[loc]; + } else { + return (loc); } } } -- cgit v1.2.3