aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/map.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/map.go')
-rw-r--r--src/runtime/map.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/map.go b/src/runtime/map.go
index 5b264b0713..68ba4e44b8 100644
--- a/src/runtime/map.go
+++ b/src/runtime/map.go
@@ -1651,7 +1651,7 @@ func copyKeys(t *maptype, h *hmap, b *bmap, s *slice, offset uint8) {
if s.len >= s.cap {
fatal("concurrent map read and map write")
}
- typedmemmove(t.Key, add(s.array, uintptr(s.len)*uintptr(t.KeySize)), k)
+ typedmemmove(t.Key, add(s.array, uintptr(s.len)*uintptr(t.Key.Size())), k)
s.len++
}
b = b.overflow(t)
@@ -1716,7 +1716,7 @@ func copyValues(t *maptype, h *hmap, b *bmap, s *slice, offset uint8) {
if s.len >= s.cap {
fatal("concurrent map read and map write")
}
- typedmemmove(t.Elem, add(s.array, uintptr(s.len)*uintptr(t.ValueSize)), ele)
+ typedmemmove(t.Elem, add(s.array, uintptr(s.len)*uintptr(t.Elem.Size())), ele)
s.len++
}
b = b.overflow(t)