From 085fedefe00d60eee9defa5f59a86361348e2f5c Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 10 Dec 2017 00:43:28 +1100 Subject: src/lobject.js: Add undefined as pointer form of void 0 --- src/lobject.js | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- cgit v1.2.3-70-g09d2