From 0056d9310ac1f8338e849111bfb6b76de84664dc Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 24 Mar 2017 08:58:00 +0100 Subject: Missing floor --- src/lmathlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lmathlib.js') 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; }; -- cgit v1.2.3-54-g00ecf