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:
zik.saleeba 2009-06-02 06:40:47 +00:00
parent 2f8f365d46
commit 9f9728dab5

2
lex.c
View file

@ -365,7 +365,7 @@ enum LexToken LexScanGetToken(struct LexState *Lexer, struct Value **Value)
Lexer->Pos++;
}
if (Lexer->Pos == Lexer->End)
if (Lexer->Pos == Lexer->End || *Lexer->Pos == '\0')
return TokenEOF;
ThisChar = *Lexer->Pos;