aboutsummaryrefslogtreecommitdiff
path: root/src/PGN.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-01-27 14:26:09 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2022-01-27 14:26:09 +0100
commit0258e7d4f8dca70aee8d992b68b9fe587c7a7811 (patch)
treed1ce82712434d674248ca1538a70bb2478cdaad5 /src/PGN.cpp
parent2ec4942cc0928d80b7313a4a8844e11708bfc7ac (diff)
Debug and update readme
Diffstat (limited to 'src/PGN.cpp')
-rw-r--r--src/PGN.cpp13
1 files changed, 8 insertions, 5 deletions
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);
}
}
}