From 9f9728dab538eae59471e9383d0a990b06dd639d Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Tue, 2 Jun 2009 06:40:47 +0000 Subject: [PATCH] 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 --- lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lex.c b/lex.c index 8cd6adb..913f9cd 100644 --- a/lex.c +++ b/lex.c @@ -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;