Change wf iterators to treat limit=0 as no limit for consistency

This commit is contained in:
Tomaž Jerman
2023-01-04 14:19:14 +01:00
parent 9f6c2bc03f
commit cc24e622a3
+2 -1
View File
@@ -101,7 +101,8 @@ func (i *genericIterator) Next(ctx context.Context, scope *expr.Vars) (next Step
func GenericResourceNextCheck(useLimit bool, ptr, buffSize, total, limit uint, hasMore bool) bool {
// if we can go more (inverted)...
if useLimit && ptr+total >= limit {
// Treat limit = 0 the same as no limit (consistent with other bits of the system)
if (useLimit && limit != 0) && ptr+total >= limit {
return false
}