From a0fa83dc9c170542630dbc83d1732d3e7a6313e9 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 6 Jan 2018 19:32:31 +1100 Subject: Expose lua.luastring_of to construct a lua 'string' from raw byte values --- 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 1b490f3..bd10be8 100644 --- a/src/lobject.js +++ b/src/lobject.js @@ -559,7 +559,7 @@ const luaO_pushvfstring = function(L, fmt, argp) { case char['c']: { let buff = argp[a++]; if (ljstype.lisprint(buff)) - pushstr(L, defs.string_of(buff)); + pushstr(L, defs.luastring_of(buff)); else luaO_pushfstring(L, defs.to_luastring("<\\%d>", true), buff); break; -- cgit v1.2.3-54-g00ecf