diff options
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lapi.js b/src/lapi.js index 3520b15..d1ca02f 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -652,11 +652,7 @@ const lua_stringtonumber = function(L, s) { // TODO: pisnum const lua_tointegerx = function(L, idx) { - let o = index2addr(L, idx); - let res = lvm.tointeger(o); - if (res === false) - res = 0; /* call to 'tointeger' may change 'n' even if it fails */ - return res; + return lvm.tointeger(index2addr(L, idx)); }; const f_call = function(L, ud) { |