Fix typo in overflow check
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
6e4761c819
commit
80dbc25b6d
@ -110,7 +110,7 @@ func Count(ri RunIterator) (uint64, error) {
|
||||
return 0, err
|
||||
}
|
||||
if r.Val {
|
||||
if math.MaxUint64-r.Len > count {
|
||||
if math.MaxUint64-r.Len < count {
|
||||
return 0, xerrors.New("RLE+ overflows")
|
||||
}
|
||||
count += r.Len
|
||||
|
Loading…
Reference in New Issue
Block a user