diff options
Diffstat (limited to 'lvm.c')
| -rw-r--r-- | lvm.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1250,11 +1250,15 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
| 1250 | int b = GETARG_B(i); | 1250 | int b = GETARG_B(i); |
| 1251 | int c = GETARG_C(i); | 1251 | int c = GETARG_C(i); |
| 1252 | Table *t; | 1252 | Table *t; |
| 1253 | c = (c == 0) ? 0 : 1 << (c - 1); /* size is 2^c */ | ||
| 1254 | if (b >= LIMTABSZ) | ||
| 1255 | b += LFIELDS_PER_FLUSH * GETARG_Ax(*pc) - LIMTABSZ; | ||
| 1256 | pc++; /* skip extra argument */ | ||
| 1253 | L->top = ci->top; /* correct top in case of GC */ | 1257 | L->top = ci->top; /* correct top in case of GC */ |
| 1254 | t = luaH_new(L); /* memory allocation */ | 1258 | t = luaH_new(L); /* memory allocation */ |
| 1255 | sethvalue2s(L, ra, t); | 1259 | sethvalue2s(L, ra, t); |
| 1256 | if (b != 0 || c != 0) | 1260 | if (b != 0 || c != 0) |
| 1257 | luaH_resize(L, t, luaO_fb2int(b), luaO_fb2int(c)); /* idem */ | 1261 | luaH_resize(L, t, b, c); /* idem */ |
| 1258 | checkGC(L, ra + 1); | 1262 | checkGC(L, ra + 1); |
| 1259 | vmbreak; | 1263 | vmbreak; |
| 1260 | } | 1264 | } |
