From: H.G.Muller Date: Sun, 24 Apr 2016 19:10:06 +0000 (+0200) Subject: Fix EOF detection in PGN parser X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ebf8f690dfc868c231baacd2232840e14586d00f;p=xboard.git Fix EOF detection in PGN parser The result of fgetc was stored in a (char) before comparing it with EOF, which fails badly if the char is not signed. --- diff --git a/parser.c b/parser.c index 8378132..4c634ca 100644 --- a/parser.c +++ b/parser.c @@ -285,7 +285,7 @@ KifuMove (char **p) int ReadLine () { // Read one line from the input file, and append to the buffer - char c, *start = inPtr; + int c; char *start = inPtr; if(fromString) return 0; // parsing string, so the end is a hard end if(!inputFile) return 0; while((c = fgetc(inputFile)) != EOF) {