From 43a65c186b9ffc3793260c0fa8612bba515440fe Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 Jan 2018 14:47:50 +1100 Subject: src/lstrlib.js: Fix trying to set string value in Uint8Array --- src/lstrlib.js | 4 ++-- 1 file 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 */ } }; -- cgit v1.2.3-70-g09d2