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.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/slice.go b/src/runtime/slice.go
index 9ca0adefd8..75f202fca0 100644
--- a/src/runtime/slice.go
+++ b/src/runtime/slice.go
@@ -194,7 +194,7 @@ func growslice(et *_type, old slice, cap int) slice {
}
if cap < old.cap {
- panic(errorString("growslice: cap out of range"))
+ panic(errorString("growslice: len out of range"))
}
if et.size == 0 {
@@ -284,7 +284,7 @@ func growslice(et *_type, old slice, cap int) slice {
// print(len(s), "\n")
// }
if overflow || capmem > maxAlloc {
- panic(errorString("growslice: cap out of range"))
+ panic(errorString("growslice: len out of range"))
}
var p unsafe.Pointer