Made it so a null character causes EOF. This shouldn't really be necessary but maybe it makes it easier for some implementations.
git-svn-id: http://picoc.googlecode.com/svn/trunk@317 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
2f8f365d46
commit
9f9728dab5
2
lex.c
2
lex.c
|
@ -365,7 +365,7 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
|
||||||
Lexer->Pos++;
|
Lexer->Pos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Lexer->Pos == Lexer->End)
|
if (Lexer->Pos == Lexer->End || *Lexer->Pos == '\0')
|
||||||
return TokenEOF;
|
return TokenEOF;
|
||||||
|
|
||||||
ThisChar = *Lexer->Pos;
|
ThisChar = *Lexer->Pos;
|
||||||
|
|
Loading…
Reference in a new issue