summaryrefslogtreecommitdiff
path: root/src/lmathlib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lmathlib.js')
-rw-r--r--src/lmathlib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lmathlib.js b/src/lmathlib.js
index 724ad75..7553dfd 100644
--- a/src/lmathlib.js
+++ b/src/lmathlib.js
@@ -111,7 +111,7 @@ const math_floor = function(L) {
if (lapi.lua_isinteger(L, 1))
lapi.lua_settop(L, 1);
else
- pushnumint(L, lauxlib.luaL_checknumber(L, 1));
+ pushnumint(L, Math.floor(lauxlib.luaL_checknumber(L, 1)));
return 1;
};