From: H.G. Muller Date: Sun, 27 Sep 2009 17:36:23 +0000 (-0700) Subject: fixed parse bug for pgn files X-Git-Tag: v4.4.1.20091019~81 X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=652eb1af5a14bffe3113a997c6c881fca50119e0 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 --- 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) {