summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-03-23 15:46:09 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-03-24 07:05:47 +0100
commitd3530bdc202419c85ec79fdb01197112cab8a788 (patch)
treef83dd6abe1a539a5085320d071ee4934950fb87b /src/lauxlib.js
parent4dc92d3e554278192c2979dd3d81942ca24f15b6 (diff)
downloadfengari-d3530bdc202419c85ec79fdb01197112cab8a788.tar.gz
fengari-d3530bdc202419c85ec79fdb01197112cab8a788.tar.bz2
fengari-d3530bdc202419c85ec79fdb01197112cab8a788.zip
strings.lua
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index f175fde..c2852ac 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -165,7 +165,7 @@ const luaL_checkstring = function(L, n) {
const luaL_checklstring = function(L, arg) {
let s = lapi.lua_tolstring(L, arg);
- if (!s) tag_error(L, arg, CT.LUA_TSTRING);
+ if (typeof s !== "string") tag_error(L, arg, CT.LUA_TSTRING);
return s;
};
@@ -577,4 +577,4 @@ module.exports.luaL_requiref = luaL_requiref;
module.exports.luaL_setfuncs = luaL_setfuncs;
module.exports.luaL_tolstring = luaL_tolstring;
module.exports.luaL_typename = luaL_typename;
-module.exports.luaL_where = luaL_where; \ No newline at end of file
+module.exports.luaL_where = luaL_where;