aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/PGN.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/PGN.cpp b/src/PGN.cpp
index e82179f..0f15fb3 100644
--- a/src/PGN.cpp
+++ b/src/PGN.cpp
@@ -329,9 +329,12 @@ loctype PGN::GotoNextToken(loctype loc) {
}
c = pgn_content[loc];
if (c == '%' || c == ';') {
- loc = GotoEOL(loc)+1;
- if (IS_EOF) {
- return (loc);
+ loc = GotoEOL(loc);
+ if(!IS_EOF){
+ c=pgn_content[loc];
+ }
+ else{
+ return(loc);
}
}
}