From bb98939e249642403abc9524988da1388276f8b7 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Wed, 30 Mar 2022 12:56:07 +0200 Subject: [PATCH] Fix build with zig 0.10.0-dev.1946+6f4343b61 I wasn't planning on (publicly) keeping up with Zig master before the next release, but it's looking like 0.10 will mainly focus on the new stage2 compiler and there might not be any significant language/stdlib changes. If that's the case, might as well pull in this little change in order to increase chances of ncdu working out of the box when 0.10 is out. --- src/browser.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser.zig b/src/browser.zig index 3932459..13e09eb 100644 --- a/src/browser.zig +++ b/src/browser.zig @@ -215,7 +215,7 @@ const Row = struct { ui.addch('['); if (main.config.show_percent) { self.bg.fg(.num); - ui.addprint("{d:>5.1}", .{ 100* + ui.addprint("{d:>5.1}", .{ 100 * if (main.config.show_blocks) @intToFloat(f32, item.blocks) / @intToFloat(f32, std.math.max(1, dir_parent.entry.blocks)) else @intToFloat(f32, item.size) / @intToFloat(f32, std.math.max(1, dir_parent.entry.size)) });