small BUG: pragma deletes 0 at end of yytext, so a syntax error just after
it may have a wrong token in message.
This commit is contained in:
3
lex.c
3
lex.c
@@ -1,4 +1,4 @@
|
|||||||
char *rcs_lex = "$Id: lex.c,v 2.38 1996/11/08 12:49:35 roberto Exp roberto $";
|
char *rcs_lex = "$Id: lex.c,v 2.39 1996/11/08 19:08:30 roberto Exp roberto $";
|
||||||
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -96,6 +96,7 @@ static int inclinenumber (int pragma_allowed)
|
|||||||
else if (strcmp(buff, "nodebug") == 0)
|
else if (strcmp(buff, "nodebug") == 0)
|
||||||
lua_debug = 0;
|
lua_debug = 0;
|
||||||
else luaI_syntaxerror("invalid pragma");
|
else luaI_syntaxerror("invalid pragma");
|
||||||
|
buff[1] = buff[2] = buff[3] = 0; /* (re)set for next token */
|
||||||
}
|
}
|
||||||
return lua_linenumber;
|
return lua_linenumber;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user