diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-21 12:44:04 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-21 12:44:04 -0200 |
commit | 65459e7938eff99d55fdd914e03029cf490530c1 (patch) | |
tree | b3e229727f811f467a04ee70cf4401da1fad5544 | |
parent | 42359b8b133906fb06ecafa7f853519c818616e3 (diff) | |
download | lua-65459e7938eff99d55fdd914e03029cf490530c1.tar.gz lua-65459e7938eff99d55fdd914e03029cf490530c1.tar.bz2 lua-65459e7938eff99d55fdd914e03029cf490530c1.zip |
small BUG: pragma deletes 0 at end of yytext, so a syntax error just after
it may have a wrong token in message.
-rw-r--r-- | lex.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | char *rcs_lex = "$Id: lex.c,v 2.38 1996/11/08 12:49:35 roberto Exp roberto $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.39 1996/11/08 19:08:30 roberto Exp roberto $"; |
2 | 2 | ||
3 | 3 | ||
4 | #include <ctype.h> | 4 | #include <ctype.h> |
@@ -96,6 +96,7 @@ static int inclinenumber (int pragma_allowed) | |||
96 | else if (strcmp(buff, "nodebug") == 0) | 96 | else if (strcmp(buff, "nodebug") == 0) |
97 | lua_debug = 0; | 97 | lua_debug = 0; |
98 | else luaI_syntaxerror("invalid pragma"); | 98 | else luaI_syntaxerror("invalid pragma"); |
99 | buff[1] = buff[2] = buff[3] = 0; /* (re)set for next token */ | ||
99 | } | 100 | } |
100 | return lua_linenumber; | 101 | return lua_linenumber; |
101 | } | 102 | } |