From 652eb1af5a14bffe3113a997c6c881fca50119e0 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 27 Sep 2009 10:36:23 -0700 Subject: [PATCH] fixed parse bug for pgn files 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 | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/pgntags.c b/pgntags.c index 0d4b26f..7e66de1 100644 --- 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) { -- 1.7.0.4