diff options
Diffstat (limited to 'ltm.c')
| -rw-r--r-- | ltm.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -265,11 +265,11 @@ void luaT_adjustvarargs (lua_State *L, CallInfo *ci, const Proto *p) { | |||
| 265 | setobjs2s(L, L->top.p++, ci->func.p + i); | 265 | setobjs2s(L, L->top.p++, ci->func.p + i); |
| 266 | setnilvalue(s2v(ci->func.p + i)); /* erase original parameter (for GC) */ | 266 | setnilvalue(s2v(ci->func.p + i)); /* erase original parameter (for GC) */ |
| 267 | } | 267 | } |
| 268 | if (p->flag & (PF_VAPTAB | PF_VATAB)) { /* is there a vararg table? */ | 268 | if (p->flag & PF_VAVAR) { /* is there a vararg parameter? */ |
| 269 | if (p->flag & PF_VAPTAB) /* is vararg table fake? */ | 269 | if (p->flag & PF_VATAB) /* does it need a vararg table? */ |
| 270 | setnilvalue(s2v(L->top.p)); /* initialize it */ | ||
| 271 | else | ||
| 272 | createvarargtab(L, ci->func.p + nfixparams + 1, nextra); | 270 | createvarargtab(L, ci->func.p + nfixparams + 1, nextra); |
| 271 | else /* no table; set parameter to nil */ | ||
| 272 | setnilvalue(s2v(L->top.p)); | ||
| 273 | } | 273 | } |
| 274 | ci->func.p += totalargs + 1; | 274 | ci->func.p += totalargs + 1; |
| 275 | ci->top.p += totalargs + 1; | 275 | ci->top.p += totalargs + 1; |
