From d1d2a636ea67c2e30a34660eeb6c7da544646bea Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 13 Dec 2017 14:48:54 +1100 Subject: src/lbaselib.js: Use TextDecoder in lua_writeline This should avoid errors thrown by to_jsstring --- src/lbaselib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lbaselib.js b/src/lbaselib.js index ca95e98..30e77fb 100644 --- a/src/lbaselib.js +++ b/src/lbaselib.js @@ -11,7 +11,7 @@ if (typeof process === "undefined") { buff = buff.concat(s); }; lua_writeline = function() { - console.log(lua.to_jsstring(buff)); + console.log(new TextDecoder("utf-8").decode(Uint8Array.from(buff))); buff = []; }; } else { -- cgit v1.2.3-70-g09d2