aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-05-29 16:41:07 +1000
committerdaurnimator <quae@daurnimator.com>2017-05-29 16:42:14 +1000
commite356991b0500d282198c70d14a30a8216361c081 (patch)
tree0662f99730c7ad17898bbc0c4d826de6a8f0ca03 /src
parent96793f8938c49e0f9d8c1308d0250232a2c66299 (diff)
downloadfengari-e356991b0500d282198c70d14a30a8216361c081.tar.gz
fengari-e356991b0500d282198c70d14a30a8216361c081.tar.bz2
fengari-e356991b0500d282198c70d14a30a8216361c081.zip
src/lutf8lib.js: Use String.fromCodePoint so that astral characters work
Diffstat (limited to 'src')
-rw-r--r--src/lutf8lib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lutf8lib.js b/src/lutf8lib.js
index 803898b..b69abb0 100644
--- a/src/lutf8lib.js
+++ b/src/lutf8lib.js
@@ -80,7 +80,7 @@ const utflen = function(L) {
const pushutfchar = function(L, arg) {
let code = lauxlib.luaL_checkinteger(L, arg);
lauxlib.luaL_argcheck(L, 0 <= code && code <= MAXUNICODE, arg, lua.to_luastring("value out of range", true));
- lua.lua_pushstring(L, lua.to_luastring(String.fromCharCode(code)));
+ lua.lua_pushstring(L, lua.to_luastring(String.fromCodePoint(code)));
};
/*