From 38e05a3e6441e6b5c5e659d4f6db28b2786d375c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 19 Mar 2024 14:20:25 +0000 Subject: [PATCH] adjust arrays to 1 based offset when row value is an array being converted to table --- flow/pua/peerdb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/pua/peerdb.go b/flow/pua/peerdb.go index c81256ef3c..9f72df00ec 100644 --- a/flow/pua/peerdb.go +++ b/flow/pua/peerdb.go @@ -224,7 +224,7 @@ func LuaRecordIndex(ls *lua.LState) int { func qvToLTable[T any](ls *lua.LState, s []T, f func(x T) lua.LValue) *lua.LTable { tbl := ls.CreateTable(len(s), 0) for idx, val := range s { - tbl.RawSetInt(idx, f(val)) + tbl.RawSetInt(idx+1, f(val)) } return tbl }