diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-08-11 10:28:05 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-08-11 10:28:05 -0300 |
commit | 1d420c2c11a408d6374b074005b33417877caabc (patch) | |
tree | 73694eebd7bf747fbfeac664288333d9dfeedb40 | |
parent | 5378331f2df1ba5bc3a4dc38f7b3ae53c3f2cbef (diff) | |
download | lua-1d420c2c11a408d6374b074005b33417877caabc.tar.gz lua-1d420c2c11a408d6374b074005b33417877caabc.tar.bz2 lua-1d420c2c11a408d6374b074005b33417877caabc.zip |
better error message for code too long (old one was misleading when the
problem was SETLINE after 64k lines...)
-rw-r--r-- | lparser.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.3 1998/07/06 22:07:51 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.4 1998/07/24 18:02:38 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -172,7 +172,8 @@ static int code_oparg_at (LexState *ls, int pc, OpCode op, int builtin, | |||
172 | code[pc+2] = arg&0xFF; | 172 | code[pc+2] = arg&0xFF; |
173 | return 3; | 173 | return 3; |
174 | } | 174 | } |
175 | else luaX_error(ls, "code too long " MES_LIM("64K")); | 175 | else luaX_error(ls, "code too long " MES_LIM("64K") |
176 | " (try turning off debug mode)"); | ||
176 | return 0; /* to avoid warnings */ | 177 | return 0; /* to avoid warnings */ |
177 | } | 178 | } |
178 | 179 | ||