From ebf8f690dfc868c231baacd2232840e14586d00f Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 24 Apr 2016 21:10:06 +0200 Subject: [PATCH] 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. --- parser.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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) { -- 1.7.0.4