summaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
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;