aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-05-12 23:26:21 +0100
committergingerBill <bill@gingerbill.org>2021-05-12 23:26:21 +0100
commit5420cc083d08a4c0faffbcf3ec1deecf05b6265d (patch)
tree9319576ce3436802460218b3f2fa75312d1e9128
parentc81f7b31c6253d70ff08f3c4ca346676f4bfbda0 (diff)
Implement #807
-rw-r--r--core/fmt/fmt.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fmt/fmt.odin b/core/fmt/fmt.odin
index f9c386ffb..3b3716a15 100644
--- a/core/fmt/fmt.odin
+++ b/core/fmt/fmt.odin
@@ -641,9 +641,9 @@ fmt_write_padding :: proc(fi: ^Info, width: int) {
return;
}
- pad_byte: byte = '0';
- if fi.space {
- pad_byte = ' ';
+ pad_byte: byte = ' ';
+ if !fi.space {
+ pad_byte = '0';
}
for i := 0; i < width; i += 1 {