Fix string.find with plain = true

This commit is contained in:
Zef Hemel
2025-03-29 22:07:31 +01:00
parent f429e1f7b2
commit c25a3bf0eb
+1 -1
View File
@@ -105,7 +105,7 @@ export const stringApi = new LuaTable({
// Plain
const index = s.indexOf(pattern, init - 1);
return (index === -1)
? new LuaMultiRes([])
? null
: new LuaMultiRes([index + 1, index + pattern.length]);
},
),