From 0a006ad403733a85abe5be3f242c0264a4556afb Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Fri, 24 Feb 2017 15:05:44 +0100 Subject: math.abs, math.sin, math.cos, math.tan, math.asin, math.acos, math.atan --- src/lvm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lvm.js') diff --git a/src/lvm.js b/src/lvm.js index a0822cc..d623a72 100644 --- a/src/lvm.js +++ b/src/lvm.js @@ -845,7 +845,7 @@ const luaV_tointeger = function(obj, mode) { }; const tointeger = function(o) { - return o.ttisinteger() ? o.value : luaV_tointeger(o, 0); + return o.ttisinteger() ? o.value|0 : luaV_tointeger(o, 0); }; const tonumber = function(v) { -- cgit v1.2.3-54-g00ecf