summaryrefslogtreecommitdiff
path: root/src/lbaselib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-30 17:13:43 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-30 17:13:43 +1000
commitd0018d43f46d3c32508094a3a3c2e73cc6acf3ff (patch)
tree5b75feeb2251dee40f96b209aa7878e9848f41e8 /src/lbaselib.js
parent01992a64dc3888cc5d58771b3592c5331a3a270e (diff)
downloadfengari-d0018d43f46d3c32508094a3a3c2e73cc6acf3ff.tar.gz
fengari-d0018d43f46d3c32508094a3a3c2e73cc6acf3ff.tar.bz2
fengari-d0018d43f46d3c32508094a3a3c2e73cc6acf3ff.zip
src/lbaselib.js: Fix misleading error message from collectgarbage()
Diffstat (limited to 'src/lbaselib.js')
-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"));
};