projects
/
xboard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
fa8be4a
)
fixed parse bug for pgn files
author
H.G. Muller
<h.g.muller@hccnet.nl>
Sun, 27 Sep 2009 17:36:23 +0000 (10:36 -0700)
committer
Arun Persaud
<arun@nubati.net>
Wed, 30 Sep 2009 05:17:57 +0000 (22:17 -0700)
fixed the existing bug that the time-control tag was displayed as "?" in the game list; turns out it was never parsed on reading PGN files
pgntags.c
patch
|
blob
|
history
diff --git
a/pgntags.c
b/pgntags.c
index
0d4b26f
..
7e66de1
100644
(file)
--- a/
pgntags.c
+++ b/
pgntags.c
@@
-107,6
+107,10
@@
int ParsePGNTag(tag, gameInfo)
else
gameInfo->result = GameUnfinished;
success = TRUE;
+ } else if (StrCaseCmp(name, "TimeControl") == 0) {
+// int tc, mps, inc = -1;
+// if(sscanf(value, "%d/%d", &mps, &tc) == 2 || )
+ success = StrSavePtr(value, &gameInfo->timeControl) != NULL;
} else if (StrCaseCmp(name, "FEN") == 0) {
success = StrSavePtr(value, &gameInfo->fen) != NULL;
} else if (StrCaseCmp(name, "SetUp") == 0) {