mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
Make empty arrays work on a single line with %#v
This commit is contained in:
@@ -1219,6 +1219,10 @@ fmt_write_array :: proc(fi: ^Info, array_data: rawptr, count: int, elem_size: in
|
|||||||
io.write_byte(fi.writer, '[')
|
io.write_byte(fi.writer, '[')
|
||||||
defer io.write_byte(fi.writer, ']')
|
defer io.write_byte(fi.writer, ']')
|
||||||
|
|
||||||
|
if count <= 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if fi.hash {
|
if fi.hash {
|
||||||
io.write_byte(fi.writer, '\n')
|
io.write_byte(fi.writer, '\n')
|
||||||
defer fmt_write_indent(fi)
|
defer fmt_write_indent(fi)
|
||||||
|
|||||||
Reference in New Issue
Block a user