summaryrefslogtreecommitdiff
path: root/src/loslib.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/loslib.js')
-rw-r--r--src/loslib.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loslib.js b/src/loslib.js
index ecd42f1..ee9ddca 100644
--- a/src/loslib.js
+++ b/src/loslib.js
@@ -112,7 +112,7 @@ const os_date = function(L) {
} else {
i++; /* skip '%' */
i = checkoption(L, s, i, cc.subarray(1)); /* copy specifier to 'cc' */
- let len = cc.indexOf(0);
+ let len = lua.luastring_indexOf(cc, 0);
if (len !== -1)
cc = cc.subarray(0, len);
let buff = strftime(lua.to_jsstring(cc), stm);