From: H.G. Muller Date: Thu, 29 Dec 2011 14:32:20 +0000 (+0100) Subject: Fix parsing of faulty PGN tags X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=538f9ace50d80669d6201e48ee1f91e0f0e32572;p=xboard.git Fix parsing of faulty PGN tags A closing bracket could be missed in a malformed tag --- diff --git a/parser.c b/parser.c index dbba777..06267a3 100644 --- a/parser.c +++ b/parser.c @@ -323,7 +323,8 @@ badMove:// we failed to find algebraic move do (*p)++; while(isdigit(**p) || isalpha(**p) || **p == '+' || **p == '-' || **p == '=' || **p == '_' || **p == '#'); SkipWhite(p); - if(*(*p)++ == '"') { + if(**p == '"') { + (*p)++; while(**p != '\n' && (*(*p)++ != '"'|| (*p)[-2] == '\\')); // look for unescaped quote if((*p)[-1] !='"') { *p = oldp; Scan(']', p); return Comment; } // string closing delimiter missing SkipWhite(p); if(*(*p)++ == ']') return PGNTag;