summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-24 12:23:30 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-03-24 12:23:30 +0100
commitf893be002aebd215b499b0c72803dd1346f4eb05 (patch)
treea2c83ccfacfb50e3dd1487e2d8b7562fafc4bb5c /src/lapi.js
parent16cdb860e9e8e5550c1178a41eabb52e461ffa46 (diff)
downloadfengari-f893be002aebd215b499b0c72803dd1346f4eb05.tar.gz
fengari-f893be002aebd215b499b0c72803dd1346f4eb05.tar.bz2
fengari-f893be002aebd215b499b0c72803dd1346f4eb05.zip
Fixed bad lua_tointegerx
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js6
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) {