aboutsummaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 0231597..51b869f 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -213,7 +213,7 @@ const lua_pushnumber = function(L, n) {
const lua_pushinteger = function(L, n) {
assert(typeof n === "number");
- L.stack[L.top++] = new TValue(CT.LUA_TNUMINT, n);
+ L.stack[L.top++] = new TValue(CT.LUA_TNUMINT, n|0);
assert(L.top <= L.ci.top, "stack overflow");
};
@@ -726,7 +726,6 @@ const lua_stringtonumber = function(L, s) {
return s.length;
};
-// TODO: pisnum
const lua_tointegerx = function(L, idx) {
return lvm.tointeger(index2addr(L, idx));
};