X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.c;fp=parser.c;h=8acc2da30358f5c04792e1931911fc64ba7ec439;hb=fe8b9b8e74f9192cffffb8e0eb95227a0eab086b;hp=c997ccdb346090f42ef0be7dbf493398be69f74f;hpb=7b721be1faca2a8524f56ab9e414d0bb97215765;p=xboard.git diff --git a/parser.c b/parser.c index c997ccd..8acc2da 100644 --- a/parser.c +++ b/parser.c @@ -675,7 +675,12 @@ badMove:// we failed to find algebraic move commentEnd = *p; if(i) return Comment; // return comment that runs to EOF immediately } if(commentEnd) SkipWhite(p); - if(lastChar == '\n' && kifu && **p == '*') { while(**p && **p != '\n') (*p)++; return Comment; } // .kif comment + if(kifu && **p == '*') { // .kif comment + char *q = yytext; + while(**p && **p != '\n') { if(q < yytext + 10*MSG_SIZ-3) *q++ = **p; (*p)++; } + parseStart = yytext; *yytext = '{'; strcpy(q, "}\n"); // wrap in braces + return Comment; + } if(Match("*", p)) result = GameUnfinished; else if(**p == '0') { if( Match("0-1", p) || Match("0/1", p) || Match("0:1", p) ||