]> git.mxchange.org Git - simgear.git/commitdiff
Extra i++ led to a "double skip" when parsing a \r\n pair. So a DOS
authorandy <andy>
Mon, 8 Dec 2003 16:55:50 +0000 (16:55 +0000)
committerandy <andy>
Mon, 8 Dec 2003 16:55:50 +0000 (16:55 +0000)
file would look like it was all on one line, and a comment would skip
to the end of the file.

simgear/nasal/lex.c

index adc08e176e56de5014f0cec8675152808486b426..1cb3a22a728fe129e6210fa24c6b3019906561b7 100644 (file)
@@ -58,7 +58,6 @@ static int* findLines(struct Parser* p)
 
         // Skip over the \r of a \r\n pair.
         if(buf[i] == '\r' && (i+1)<p->len && buf[i+1] == '\n') {
-            i++;
             continue;
         }
         // Reallocate if necessary