diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 08:58:00 +0100 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-03-24 08:58:00 +0100 |
commit | 0056d9310ac1f8338e849111bfb6b76de84664dc (patch) | |
tree | c57346b6a522486a42038ca211065c9696bee80e | |
parent | d6af357adf720347f2b3e03c41a36dc70b5a3d33 (diff) | |
download | fengari-0056d9310ac1f8338e849111bfb6b76de84664dc.tar.gz fengari-0056d9310ac1f8338e849111bfb6b76de84664dc.tar.bz2 fengari-0056d9310ac1f8338e849111bfb6b76de84664dc.zip |
Missing floor
-rw-r--r-- | src/lmathlib.js | 2 |
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; }; |