summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-05-02 08:49:20 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-05-02 08:49:20 +0200
commit596ad6def55fa518aba16bf403a38c8f8e330025 (patch)
tree403fe2154f87d17c30cad53c005c6c06bbd4f4b7 /src/lapi.js
parent32ac0ddc175affc1cf166dcf4197a33bcbd53e5b (diff)
downloadfengari-596ad6def55fa518aba16bf403a38c8f8e330025.tar.gz
fengari-596ad6def55fa518aba16bf403a38c8f8e330025.tar.bz2
fengari-596ad6def55fa518aba16bf403a38c8f8e330025.zip
Corrected lua_isnumber bad use of lvm.tonumber
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lapi.js b/src/lapi.js
index e813313..6b853ae 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -778,7 +778,7 @@ const lua_isinteger = function(L, idx) {
};
const lua_isnumber = function(L, idx) {
- return lvm.tonumber(L, idx);
+ return lvm.tonumber(index2addr(L, idx)) !== false;
};
const lua_isstring = function(L, idx) {