summaryrefslogtreecommitdiff
path: root/src/lbaselib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-12-13 14:48:54 +1100
committerdaurnimator <quae@daurnimator.com>2017-12-13 15:04:10 +1100
commitd1d2a636ea67c2e30a34660eeb6c7da544646bea (patch)
treec9920e5409b024cc86a78e298514dfda82f04718 /src/lbaselib.js
parenta1ddb1f89944fc997d6f4a61445c48e8511610ca (diff)
downloadfengari-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/lbaselib.js')
-rw-r--r--src/lbaselib.js2
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 {