aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-make-slice.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/go-make-slice.c')
-rw-r--r--libgo/runtime/go-make-slice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/runtime/go-make-slice.c b/libgo/runtime/go-make-slice.c
index 42b412c..822c9b6 100644
--- a/libgo/runtime/go-make-slice.c
+++ b/libgo/runtime/go-make-slice.c
@@ -37,7 +37,7 @@ __go_make_slice2 (const struct __go_type_descriptor *td, uintptr_t len,
if (cap < len
|| (uintptr_t) icap != cap
|| (std->__element_type->__size > 0
- && cap > (uintptr_t) -1U / std->__element_type->__size))
+ && cap > MaxMem / std->__element_type->__size))
runtime_panicstring ("makeslice: cap out of range");
ret.__count = ilen;