fix bug
This commit is contained in:
parent
5a040502f8
commit
6ff3fb9289
|
@ -87,14 +87,14 @@ func (session *Session) bufferIterate(bean interface{}, fun IterFunc) error {
|
||||||
idx++
|
idx++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if slice.Elem().Len() == 0 || idx == limit {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
start = start + slice.Elem().Len()
|
start = start + slice.Elem().Len()
|
||||||
if limit > 0 && idx+bufferSize > limit {
|
if limit > 0 && idx+bufferSize > limit {
|
||||||
bufferSize = limit - idx
|
bufferSize = limit - idx
|
||||||
}
|
}
|
||||||
|
|
||||||
if bufferSize <= 0 || slice.Elem().Len() < bufferSize || idx == limit {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue