diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -224,14 +224,15 @@ static int luaB_collectgarbage (lua_State *L) { | |||
224 | return 1; | 224 | return 1; |
225 | } | 225 | } |
226 | case LUA_GCGEN: { | 226 | case LUA_GCGEN: { |
227 | int minormul = (int)luaL_optinteger(L, 2, 0); | 227 | int minormul = (int)luaL_optinteger(L, 2, -1); |
228 | int majormul = (int)luaL_optinteger(L, 3, 0); | 228 | int majorminor = (int)luaL_optinteger(L, 3, -1); |
229 | return pushmode(L, lua_gc(L, o, minormul, majormul)); | 229 | int minormajor = (int)luaL_optinteger(L, 4, -1); |
230 | return pushmode(L, lua_gc(L, o, minormul, majorminor, minormajor)); | ||
230 | } | 231 | } |
231 | case LUA_GCINC: { | 232 | case LUA_GCINC: { |
232 | int pause = (int)luaL_optinteger(L, 2, 0); | 233 | int pause = (int)luaL_optinteger(L, 2, -1); |
233 | int stepmul = (int)luaL_optinteger(L, 3, 0); | 234 | int stepmul = (int)luaL_optinteger(L, 3, -1); |
234 | int stepsize = (int)luaL_optinteger(L, 4, 0); | 235 | int stepsize = (int)luaL_optinteger(L, 4, -1); |
235 | return pushmode(L, lua_gc(L, o, pause, stepmul, stepsize)); | 236 | return pushmode(L, lua_gc(L, o, pause, stepmul, stepsize)); |
236 | } | 237 | } |
237 | default: { | 238 | default: { |