diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-29 14:47:50 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-29 14:49:44 +1100 |
commit | 43a65c186b9ffc3793260c0fa8612bba515440fe (patch) | |
tree | 312be456fa9c0baf86721634f2bc1a63f8fb26c5 | |
parent | 32fee0764e9e5e1a903ef5d16fb94718a86d7a09 (diff) | |
download | fengari-43a65c186b9ffc3793260c0fa8612bba515440fe.tar.gz fengari-43a65c186b9ffc3793260c0fa8612bba515440fe.tar.bz2 fengari-43a65c186b9ffc3793260c0fa8612bba515440fe.zip |
src/lstrlib.js: Fix trying to set string value in Uint8Array
-rw-r--r-- | src/lstrlib.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js index 9863ba5..e744853 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -254,10 +254,10 @@ const addquoted = function(b, s, len) { ** Ensures the 'buff' string uses a dot as the radix character. */ const checkdp = function(buff) { - if (luastring_indexOf(buff, '.'.charCodeAt(0)) < 0) { /* no dot? */ + if (luastring_indexOf(buff, 46 /* ('.').charCodeAt(0) */) < 0) { /* no dot? */ let point = lua_getlocaledecpoint(); /* try locale point */ let ppoint = luastring_indexOf(buff, point); - if (ppoint) buff[ppoint] = '.'; /* change it to a dot */ + if (ppoint) buff[ppoint] = 46 /* ('.').charCodeAt(0) */; /* change it to a dot */ } }; |