aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/bytes.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytes/bytes.go')
-rw-r--r--src/bytes/bytes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes/bytes.go b/src/bytes/bytes.go
index 1871814c6e..23edd5a4be 100644
--- a/src/bytes/bytes.go
+++ b/src/bytes/bytes.go
@@ -583,7 +583,7 @@ func Repeat(b []byte, count int) []byte {
if count < 0 {
panic("bytes: negative Repeat count")
}
- if len(b) >= maxInt/count {
+ if len(b) > maxInt/count {
panic("bytes: Repeat output length overflow")
}
n := len(b) * count