mirror of
https://gitlab.com/manzerbredes/pgnp.git
synced 2025-04-06 10:06:25 +02:00
Improve comment parsing
This commit is contained in:
parent
2e30eaccb1
commit
3f1e9da333
1 changed files with 9 additions and 0 deletions
|
@ -151,6 +151,9 @@ int PGN::ParseHalfMove(int loc, HalfMove *hm) {
|
||||||
hm->isBlack = true;
|
hm->isBlack = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse comment entries (various comment could appear during HalfMove parsing)
|
||||||
|
loc=ParseComment(loc,hm);
|
||||||
|
|
||||||
// Parse the HalfMove
|
// Parse the HalfMove
|
||||||
loc = NextNonBlank(loc);
|
loc = NextNonBlank(loc);
|
||||||
EOF_CHECK(loc);
|
EOF_CHECK(loc);
|
||||||
|
@ -164,6 +167,9 @@ int PGN::ParseHalfMove(int loc, HalfMove *hm) {
|
||||||
}
|
}
|
||||||
hm->move = move;
|
hm->move = move;
|
||||||
|
|
||||||
|
// Parse comment
|
||||||
|
loc=ParseComment(loc,hm);
|
||||||
|
|
||||||
// Skip end of variation
|
// Skip end of variation
|
||||||
if (c == ')') {
|
if (c == ')') {
|
||||||
loc++;
|
loc++;
|
||||||
|
@ -183,6 +189,9 @@ int PGN::ParseHalfMove(int loc, HalfMove *hm) {
|
||||||
loc++; // Skip ')'
|
loc++; // Skip ')'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parse comment
|
||||||
|
loc=ParseComment(loc,hm);
|
||||||
|
|
||||||
// Parse next HalfMove
|
// Parse next HalfMove
|
||||||
loc = NextNonBlank(loc);
|
loc = NextNonBlank(loc);
|
||||||
if (!IS_EOF(loc)) {
|
if (!IS_EOF(loc)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue