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

This commit is contained in:
adasauce 2023-04-11 13:23:19 -03:00 committed by GitHub
parent 88008e4eb3
commit 76e5ee1fa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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