Skip to content

Commit 699b70f

Browse files
Fix binaryutil failures (temp commit)
1 parent c55ce24 commit 699b70f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

internal/binaryutil/binaryutil.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
package binaryutil
88

9-
import "math"
10-
119
// ReadI64 reads an 8-byte little-endian int64 from src.
1210
//
1311
// Performs bit operations directly to avoid signed overflow.
@@ -28,10 +26,7 @@ func ReadI64(src []byte) (int64, []byte, bool) {
2826
uint64(src[6])<<48 |
2927
uint64(src[7])<<56
3028

31-
if value > math.MaxInt64 {
32-
return 0, src[8:], false
33-
}
34-
29+
// Reinterpret bits as int64 (handles negative numbers correctly)
3530
return int64(value), src[8:], true
3631
}
3732

0 commit comments

Comments
 (0)