aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-10 00:43:28 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-10 00:43:28 +1100
commit085fedefe00d60eee9defa5f59a86361348e2f5c (patch)
tree44e4350bffc7178bbbb8db0b46c1895efb0d4f4f /src
parenta05c57d01d1ef8d68cebe97e8656c832f9fe4c12 (diff)
downloadfengari-085fedefe00d60eee9defa5f59a86361348e2f5c.tar.gz
fengari-085fedefe00d60eee9defa5f59a86361348e2f5c.tar.bz2
fengari-085fedefe00d60eee9defa5f59a86361348e2f5c.zip
src/lobject.js: Add undefined as pointer form of void 0
Diffstat (limited to 'src')
-rw-r--r--src/lobject.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lobject.js b/src/lobject.js
index a5219e5..bc0909d 100644
--- a/src/lobject.js
+++ b/src/lobject.js
@@ -585,6 +585,8 @@ const luaO_pushvfstring = function(L, fmt, argp) {
L.l_G.ids.set(v, id);
}
pushstr(L, defs.to_luastring("0x"+id.toString(16)));
+ } else if (v === void 0) {
+ pushstr(L, defs.to_luastring("undefined"));
} else if (typeof v === "number") { /* before check object as null is an object */
pushstr(L, defs.to_luastring("Number("+v+")"));
} else if (typeof v === "string") { /* before check object as null is an object */