From 3e7c102eefbaae9e6bc839b11bba79aee1c5e040 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 13 Dec 2017 15:13:27 +1100 Subject: Introduce defs.string_of to create string from bytes --- src/lobject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lobject.js') diff --git a/src/lobject.js b/src/lobject.js index a70866d..707cdf8 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -547,7 +547,7 @@ const luaO_pushvfstring = function(L, fmt, argp) { case char['c']: { let buff = argp[a++]; if (ljstype.lisprint(buff)) - pushstr(L, [buff]); + pushstr(L, defs.string_of(buff)); else luaO_pushfstring(L, defs.to_luastring("<\\%d>", true), buff); break; -- cgit v1.2.3-54-g00ecf