summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-06 07:34:00 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-06 08:07:34 +0100
commitd792a7dad54039074890d9d379eec8676cb9fa5a (patch)
tree3bb2391b1a48f4fa460ab5f20f9f439b533c9e65 /src/lapi.js
parent2ac8543dfd87f4c227385d6890bfcb011fc341f1 (diff)
downloadfengari-d792a7dad54039074890d9d379eec8676cb9fa5a.tar.gz
fengari-d792a7dad54039074890d9d379eec8676cb9fa5a.tar.bz2
fengari-d792a7dad54039074890d9d379eec8676cb9fa5a.zip
string.char
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lapi.js b/src/lapi.js
index dae533d..2fbd777 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -226,8 +226,7 @@ const lua_pushlstring = function(L, s, len) { // TODO: embedded \0
};
const lua_pushstring = function (L, s) {
- assert(typeof s === "string");
- if (!s)
+ if (typeof s !== "string")
L.stack[L.top] = ldo.nil;
else {
let ts = new TValue(CT.LUA_TLNGSTR, s);