tape: Fix "n" size returned by DecodeGBEU

This commit is contained in:
Sasha Koshka 2025-05-18 16:25:48 -04:00
parent f4fb5e80b9
commit 6e5a7115d3

View File

@ -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)
}