summaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ldebug.c b/ldebug.c
index 8cc7bbb3..a6fa2b58 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.20 2005/05/17 19:49:15 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.21 2005/05/31 14:25:18 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*/
@@ -276,7 +276,7 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
276static int precheck (const Proto *pt) { 276static int precheck (const Proto *pt) {
277 check(pt->maxstacksize <= MAXSTACK); 277 check(pt->maxstacksize <= MAXSTACK);
278 check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); 278 check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0);
279 lua_assert(pt->numparams+pt->is_vararg <= pt->maxstacksize); 279 lua_assert(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize);
280 check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); 280 check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN);
281 return 1; 281 return 1;
282} 282}
@@ -440,7 +440,8 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
440 break; 440 break;
441 } 441 }
442 case OP_VARARG: { 442 case OP_VARARG: {
443 check(pt->is_vararg & NEWSTYLEVARARG); 443 check((pt->is_vararg & VARARG_ISVARARG) &&
444 !(pt->is_vararg & VARARG_NEEDSARG));
444 b--; 445 b--;
445 if (b == LUA_MULTRET) check(checkopenop(pt, pc)); 446 if (b == LUA_MULTRET) check(checkopenop(pt, pc));
446 checkreg(pt, a+b-1); 447 checkreg(pt, a+b-1);