aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldebug.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ldebug.c b/ldebug.c
index eb11ce17..e67547d3 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.37 2007/05/29 18:59:59 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.38 2008/04/02 16:16:06 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*/
@@ -280,12 +280,11 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
280 280
281static int precheck (const Proto *pt) { 281static int precheck (const Proto *pt) {
282 check(pt->maxstacksize <= MAXSTACK); 282 check(pt->maxstacksize <= MAXSTACK);
283 lua_assert(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); 283 check(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize);
284 lua_assert(!(pt->is_vararg & VARARG_NEEDSARG) || 284 check(!(pt->is_vararg & VARARG_NEEDSARG) || (pt->is_vararg & VARARG_HASARG));
285 (pt->is_vararg & VARARG_HASARG)); 285 check(pt->sizeupvalues == pt->nups || pt->sizeupvalues == 0);
286 check(pt->sizeupvalues <= pt->nups);
287 check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); 286 check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0);
288 check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); 287 check(pt->sizecode > 0 && GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN);
289 return 1; 288 return 1;
290} 289}
291 290