From 6e5a7115d3d7e0f2e5553158fd94604749cfacf6 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sun, 18 May 2025 16:25:48 -0400 Subject: [PATCH] tape: Fix "n" size returned by DecodeGBEU --- tape/types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tape/types.go b/tape/types.go index ea5045d..448e0cf 100644 --- a/tape/types.go +++ b/tape/types.go @@ -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) }