diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-10 00:43:28 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-10 00:43:28 +1100 |
commit | 085fedefe00d60eee9defa5f59a86361348e2f5c (patch) | |
tree | 44e4350bffc7178bbbb8db0b46c1895efb0d4f4f /src/lobject.js | |
parent | a05c57d01d1ef8d68cebe97e8656c832f9fe4c12 (diff) | |
download | fengari-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/lobject.js')
-rw-r--r-- | src/lobject.js | 2 |
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 */ |