From c196348717dfda116726145220e5d1311547980e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Oct 2002 17:40:58 -0300 Subject: in case of memory allocation errors, sizecode and sizelineinfo can be different --- ldebug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 0cf0f963..764134d9 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 1.133 2002/08/20 20:03:05 roberto Exp roberto $ +** $Id: ldebug.c,v 1.134 2002/09/05 19:45:42 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -248,6 +248,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { static int precheck (const Proto *pt) { check(pt->maxstacksize <= MAXSTACK); + check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); lua_assert(pt->numparams+pt->is_vararg <= pt->maxstacksize); check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); return 1; -- cgit v1.2.3-55-g6feb