From eeb3d8ac1de70703ce7db4788b7fb43fcda80aa8 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 12 Apr 2017 10:06:25 +0200 Subject: debug.getinfo --- src/lapi.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lapi.js') diff --git a/src/lapi.js b/src/lapi.js index fcb07d6..894b5bb 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -230,7 +230,7 @@ const lua_pushlstring = function(L, s, len) { }; const lua_pushstring = function (L, s) { - assert(Array.isArray(s), "lua_pushstring expects array of byte"); + assert(Array.isArray(s) || s === undefined || s === null, "lua_pushstring expects array of byte"); if (s === undefined || s === null) L.stack[L.top] = new TValue(CT.LUA_TNIL, null); @@ -245,7 +245,7 @@ const lua_pushstring = function (L, s) { }; const lua_pushliteral = function (L, s) { - assert(typeof s === "string", "lua_pushliteral expects a JS string"); + assert(typeof s === "string" || s === undefined || s === null, "lua_pushliteral expects a JS string"); if (s === undefined || s === null) L.stack[L.top] = new TValue(CT.LUA_TNIL, null); -- cgit v1.2.3-54-g00ecf