summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lbaselib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lbaselib.js b/src/lbaselib.js
index 04a5e8d..b2a9951 100644
--- a/src/lbaselib.js
+++ b/src/lbaselib.js
@@ -92,7 +92,7 @@ const opts = ["stop", "restart", "collect",
"isrunning"].map((e) => lua.to_luastring(e));
const luaB_collectgarbage = function(L) {
lauxlib.luaL_checkoption(L, 1, lua.to_luastring("collect"), opts);
- lauxlib.luaL_checkinteger(L, 2);
+ lauxlib.luaL_optinteger(L, 2, 0);
lauxlib.luaL_error(L, lua.to_luastring("lua_gc not implemented"));
};