diff options
author | daurnimator <quae@daurnimator.com> | 2018-04-22 21:44:09 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-04-22 21:44:20 +1000 |
commit | df769e894b7be99ccc102615b17250e19a8f86c6 (patch) | |
tree | 6c9b79595d34844338daa56834dad58264fd3244 /src | |
parent | 668a641ee18ec3715e0fb57bab1a954362019e54 (diff) | |
download | fengari-df769e894b7be99ccc102615b17250e19a8f86c6.tar.gz fengari-df769e894b7be99ccc102615b17250e19a8f86c6.tar.bz2 fengari-df769e894b7be99ccc102615b17250e19a8f86c6.zip |
src/loslib.js: cc shouldn't get reassigned
Diffstat (limited to 'src')
-rw-r--r-- | src/loslib.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/loslib.js b/src/loslib.js index 462fd49..6240ed9 100644 --- a/src/loslib.js +++ b/src/loslib.js @@ -144,9 +144,8 @@ const os_date = function(L) { i++; /* skip '%' */ i = checkoption(L, s, i, cc.subarray(1)); /* copy specifier to 'cc' */ let len = luastring_indexOf(cc, 0); - if (len !== -1) - cc = cc.subarray(0, len); - let buff = strftime(to_jsstring(cc), stm); + if (len === -1) len = void 0; + let buff = strftime(to_jsstring(cc, 0, len), stm); luaL_addstring(b, to_luastring(buff)); } } |