]> git.sesse.net Git - pgn-extract/commitdiff
Fix a segfault.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Dec 2014 18:49:26 +0000 (19:49 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 12 Dec 2014 21:56:56 +0000 (22:56 +0100)
lex.c

diff --git a/lex.c b/lex.c
index 2b1b60fea25bc850c00d88b9355173be0b678a10..3474a15523b27055716617a802e651f593f1bf3f 100644 (file)
--- a/lex.c
+++ b/lex.c
@@ -332,7 +332,7 @@ gather_string(char *line, unsigned char *linep)
         if(!GlobalState.skipping_current_game) {
             fprintf(GlobalState.logfile,"Missing closing quote in %s\n",line);
        }
-        if(len != 1){
+        if(len > 1){
             /* Move back to the null. */
             linep--;
             str[len-1] = '\0';