From 2c3febd6203b3b55f6e4e98eaf30a2821489f97f Mon Sep 17 00:00:00 2001 From: gingerBill Date: Mon, 7 Nov 2022 23:35:44 +0000 Subject: [PATCH] Correct `fmt` printing to be robust --- core/fmt/fmt.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index dbccab67b..b4118a95b 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -2085,8 +2085,8 @@ fmt_value :: proc(fi: ^Info, v: any, verb: rune) { } j += 1 - key := ks + bucket_index*uintptr(info.key.size) - value := vs + bucket_index*uintptr(info.value.size) + key := runtime.map_cell_index_dynamic(ks, &info.map_info.ks, bucket_index) + value := runtime.map_cell_index_dynamic(vs, &info.map_info.vs, bucket_index) fmt_arg(&Info{writer = fi.writer}, any{rawptr(key), info.key.id}, 'v') io.write_string(fi.writer, "=", &fi.n)