summaryrefslogtreecommitdiff
path: root/src/lobject.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-13 15:13:27 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-13 15:13:27 +1100
commit3e7c102eefbaae9e6bc839b11bba79aee1c5e040 (patch)
treec811b42cc9ffb08a0bf8a93d6141324d707f4953 /src/lobject.js
parentd1d2a636ea67c2e30a34660eeb6c7da544646bea (diff)
downloadfengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.tar.gz
fengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.tar.bz2
fengari-3e7c102eefbaae9e6bc839b11bba79aee1c5e040.zip
Introduce defs.string_of to create string from bytes
Diffstat (limited to 'src/lobject.js')
-rw-r--r--src/lobject.js2
1 files changed, 1 insertions, 1 deletions
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;