fix: querybuilder GetTargets start iteration at 1, when include is 0 causes a crash (#2109)

This commit is contained in:
adasauce authored and GitHub committed 2023-04-11 16:23:19 +00:00
1 parent 88008e4eb3
commit 76e5ee1fa6
1 file changed
+1 -1
+1 -1
View File
@@ -238,7 +238,7 @@ func (s *SourceQueryBuilder) GetTargets(include, exclude intrange.IntRanges,
lenRes = len(s.results)
)
for i := 0; i <= s.Len(); i++ {
for i := 1; i <= s.Len(); i++ {
target := i - 1
if s.bottomUp {
target = lenRes - i