From 538f9ace50d80669d6201e48ee1f91e0f0e32572 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 29 Dec 2011 15:32:20 +0100 Subject: [PATCH] Fix parsing of faulty PGN tags A closing bracket could be missed in a malformed tag --- parser.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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; -- 1.7.0.4