comment explaining OP_VARARG was wrong (and corresponding code was not

very clear)
This commit is contained in:
Roberto Ierusalimschy
2009-10-28 10:20:07 -02:00
parent 5bc91c6405
commit 77077b39d5
2 changed files with 5 additions and 5 deletions

6
lvm.c
View File

@@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 2.98 2009/09/28 16:32:50 roberto Exp roberto $
** $Id: lvm.c,v 2.99 2009/09/30 15:38:37 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -801,10 +801,10 @@ void luaV_execute (lua_State *L) {
int b = GETARG_B(i) - 1;
int j;
int n = cast_int(base - ci->func) - cl->p->numparams - 1;
if (b == LUA_MULTRET) {
if (b < 0) { /* B == 0? */
b = n; /* get all var. arguments */
Protect(luaD_checkstack(L, n));
ra = RA(i); /* previous call may change the stack */
b = n;
L->top = ra + n;
}
for (j = 0; j < b; j++) {