diff options
Diffstat (limited to 'libgo/runtime/go-new-map.c')
-rw-r--r-- | libgo/runtime/go-new-map.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/runtime/go-new-map.c b/libgo/runtime/go-new-map.c index 096856e234c..c289bc0bea0 100644 --- a/libgo/runtime/go-new-map.c +++ b/libgo/runtime/go-new-map.c @@ -106,10 +106,11 @@ __go_map_next_prime (uintptr_t n) struct __go_map * __go_new_map (const struct __go_map_descriptor *descriptor, uintptr_t entries) { - intgo ientries; + int32 ientries; struct __go_map *ret; - ientries = (intgo) entries; + /* The master library limits map entries to int32, so we do too. */ + ientries = (int32) entries; if (ientries < 0 || (uintptr_t) ientries != entries) runtime_panicstring ("map size out of range"); |