Skip to content

Commit 55e7f5b

Browse files
committed
clarifying comment on bit size
1 parent 4bd783d commit 55e7f5b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/encoding/asn1/asn1.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ func parseBase128Int(bytes []byte, initOffset int) (ret, offset int, err error)
304304
offset = initOffset
305305
var ret64 int64
306306
for shifted := 0; offset < len(bytes); shifted++ {
307-
// n shifted bytes * 7 bits per byte should be less than the max number of bits
308-
// Thus the representation is either non-minimal or too large for the system
307+
// n shifted bytes * 7 bits per byte should be less than or equal to the max number
308+
// of bits. If greater, the representation is either non-minimal or too large for
309+
// the platform
309310
if shifted * 7 > strconv.IntSize {
310311
err = StructuralError{"base 128 integer too large"}
311312
return

0 commit comments

Comments
 (0)