Przeglądaj źródła

Fix lexer when using lookahead on a source code with an identifier at the end without a semicolon

mingodad 9 lat temu
rodzic
commit
04f05803b0
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      SquiLu/squirrel/sqlexer.cpp

+ 1 - 0
SquiLu/squirrel/sqlexer.cpp

@@ -249,6 +249,7 @@ SQInteger SQLexer::LexLineComment()
 
 SQInteger SQLexer::LookaheadLex()
 {
+    if(CUR_CHAR == SQUIRREL_EOB) return 0;
     if(_data_lookahead.currentline >= 0)
     {
         return Error(_SC("lex lookahead already done"));