aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/slice.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/slice.go')
-rw-r--r--src/runtime/slice.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/slice.go b/src/runtime/slice.go
index 82a45c78a9..c0647d95a0 100644
--- a/src/runtime/slice.go
+++ b/src/runtime/slice.go
@@ -146,7 +146,7 @@ func growslice(et *_type, old slice, cap int) slice {
if cap > doublecap {
newcap = cap
} else {
- if old.len < 1024 {
+ if old.cap < 1024 {
newcap = doublecap
} else {
// Check 0 < newcap to detect overflow