diff options
author | daurnimator <quae@daurnimator.com> | 2017-12-13 14:48:54 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-12-13 15:04:10 +1100 |
commit | d1d2a636ea67c2e30a34660eeb6c7da544646bea (patch) | |
tree | c9920e5409b024cc86a78e298514dfda82f04718 /src | |
parent | a1ddb1f89944fc997d6f4a61445c48e8511610ca (diff) | |
download | fengari-d1d2a636ea67c2e30a34660eeb6c7da544646bea.tar.gz fengari-d1d2a636ea67c2e30a34660eeb6c7da544646bea.tar.bz2 fengari-d1d2a636ea67c2e30a34660eeb6c7da544646bea.zip |
src/lbaselib.js: Use TextDecoder in lua_writeline
This should avoid errors thrown by to_jsstring
Diffstat (limited to 'src')
-rw-r--r-- | src/lbaselib.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |