summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-24 08:58:00 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-03-24 08:58:00 +0100
commit0056d9310ac1f8338e849111bfb6b76de84664dc (patch)
treec57346b6a522486a42038ca211065c9696bee80e /src
parentd6af357adf720347f2b3e03c41a36dc70b5a3d33 (diff)
downloadfengari-0056d9310ac1f8338e849111bfb6b76de84664dc.tar.gz
fengari-0056d9310ac1f8338e849111bfb6b76de84664dc.tar.bz2
fengari-0056d9310ac1f8338e849111bfb6b76de84664dc.zip
Missing floor
Diffstat (limited to 'src')
-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;
};