diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin index 4ecb19c21..3118e7e5e 100644 --- a/core/fmt/fmt.odin +++ b/core/fmt/fmt.odin @@ -3132,12 +3132,14 @@ fmt_map :: proc(fi: ^Info, v: any, info: runtime.Type_Info_Map, verb: rune) { 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}, verb) - if hash { - io.write_string(fi.writer, " = ", &fi.n) - } else { - io.write_string(fi.writer, "=", &fi.n) + if info.value.size > 0 { + if hash { + io.write_string(fi.writer, " = ", &fi.n) + } else { + io.write_string(fi.writer, "=", &fi.n) + } + fmt_arg(fi, any{rawptr(value), info.value.id}, verb) } - fmt_arg(fi, any{rawptr(value), info.value.id}, verb) if do_trailing_comma { io.write_string(fi.writer, ",\n", &fi.n) } }