diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-16 17:40:58 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-10-16 17:40:58 -0300 |
commit | c196348717dfda116726145220e5d1311547980e (patch) | |
tree | 83149c29559b888eed7a28e5f1558a67a912cf90 /ldebug.c | |
parent | 669129a6d8210e758ba94ea2786a370946572f7d (diff) | |
download | lua-c196348717dfda116726145220e5d1311547980e.tar.gz lua-c196348717dfda116726145220e5d1311547980e.tar.bz2 lua-c196348717dfda116726145220e5d1311547980e.zip |
in case of memory allocation errors, sizecode and sizelineinfo can
be different
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.133 2002/08/20 20:03:05 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.134 2002/09/05 19:45:42 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -248,6 +248,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { | |||
248 | 248 | ||
249 | static int precheck (const Proto *pt) { | 249 | static int precheck (const Proto *pt) { |
250 | check(pt->maxstacksize <= MAXSTACK); | 250 | check(pt->maxstacksize <= MAXSTACK); |
251 | check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); | ||
251 | lua_assert(pt->numparams+pt->is_vararg <= pt->maxstacksize); | 252 | lua_assert(pt->numparams+pt->is_vararg <= pt->maxstacksize); |
252 | check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); | 253 | check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); |
253 | return 1; | 254 | return 1; |