aboutsummaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-04-12 10:06:25 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-04-12 10:54:41 +0200
commiteeb3d8ac1de70703ce7db4788b7fb43fcda80aa8 (patch)
treea3d8b2dffceeb2cd7b0bc0dc95feaaa2386939c4 /src/lapi.js
parentfc08312ebf8cf01a53b4826acce0f1c3aedcdc53 (diff)
downloadfengari-eeb3d8ac1de70703ce7db4788b7fb43fcda80aa8.tar.gz
fengari-eeb3d8ac1de70703ce7db4788b7fb43fcda80aa8.tar.bz2
fengari-eeb3d8ac1de70703ce7db4788b7fb43fcda80aa8.zip
debug.getinfo
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js4
1 files changed, 2 insertions, 2 deletions
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);