diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-29 16:41:07 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-29 16:42:14 +1000 |
commit | e356991b0500d282198c70d14a30a8216361c081 (patch) | |
tree | 0662f99730c7ad17898bbc0c4d826de6a8f0ca03 /src/lutf8lib.js | |
parent | 96793f8938c49e0f9d8c1308d0250232a2c66299 (diff) | |
download | fengari-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/lutf8lib.js')
-rw-r--r-- | src/lutf8lib.js | 2 |
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))); }; /* |