message-size-increase #3
@ -113,10 +113,10 @@ func DecodeGBEU[T UInt](data []byte) (value T, n int, err error) {
|
||||
fullValue *= 0x80
|
||||
fullValue += uint64(chunk & 0x7F)
|
||||
ccb := chunk >> 7
|
||||
n += 1
|
||||
if ccb == 0 {
|
||||
return T(fullValue), n, nil
|
||||
}
|
||||
n += 1
|
||||
}
|
||||
return 0, n, fmt.Errorf("decoding GBEU: %w", ErrGBEUNotTerminated)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user