Make regex matching set INTEGER keys not string

This commit is contained in:
2025-11-03 19:06:59 +01:00
parent ee8c4b9aa5
commit 590f19603e
2 changed files with 6 additions and 7 deletions

View File

@@ -599,8 +599,8 @@ func EvalRegex(L *lua.LState) int {
if len(matches) > 0 {
matchesTable := L.NewTable()
for i, match := range matches {
matchesTable.RawSetString(fmt.Sprintf("%d", i), lua.LString(match))
evalRegexLogger.Debug("Set table[%d] = %q", i, match)
matchesTable.RawSetInt(i+1, lua.LString(match))
evalRegexLogger.Debug("Set table[%d] = %q", i+1, match)
}
L.Push(matchesTable)
} else {