aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lvm.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lvm.js b/src/lvm.js
index 376e64e..8ca7b98 100644
--- a/src/lvm.js
+++ b/src/lvm.js
@@ -845,7 +845,8 @@ const luaV_tointeger = function(obj, mode) {
} else if (obj.ttisinteger()) {
return obj.value;
} else if (obj.ttisstring()) {
- return luaV_tointeger(lobject.luaO_str2num(obj.svalue()), mode);
+ let n = lobject.luaO_str2num(obj.svalue());
+ return n !== false ? luaV_tointeger(n, mode) : false;
}
return false;