From d3530bdc202419c85ec79fdb01197112cab8a788 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Thu, 23 Mar 2017 15:46:09 +0100 Subject: strings.lua --- src/lauxlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lauxlib.js') 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; -- cgit v1.2.3-54-g00ecf