From 596ad6def55fa518aba16bf403a38c8f8e330025 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 2 May 2017 08:49:20 +0200 Subject: Corrected lua_isnumber bad use of lvm.tonumber --- src/lapi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3-70-g09d2