diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2020-06-19 13:53:20 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2020-06-19 13:53:20 +0200 |
| commit | 6e23344e06e0318948e49213099be437a2039dfa (patch) | |
| tree | 6fe2973d173759cd3014ee3d6441a1bc537175c4 /rivertile | |
| parent | 582164ce41d3f109d4ae2ef2b945660b352440ef (diff) | |
| download | river-6e23344e06e0318948e49213099be437a2039dfa.tar.gz river-6e23344e06e0318948e49213099be437a2039dfa.tar.xz | |
rivertile: fix underflow if views < masters
Diffstat (limited to 'rivertile')
| -rw-r--r-- | rivertile/main.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rivertile/main.zig b/rivertile/main.zig index 911754e..e669920 100644 --- a/rivertile/main.zig +++ b/rivertile/main.zig @@ -66,7 +66,7 @@ pub fn main() !void { const output_width = try std.fmt.parseInt(u32, std.mem.spanZ(args[width_arg]), 10); const output_height = try std.fmt.parseInt(u32, std.mem.spanZ(args[height_arg]), 10); - const secondary_count = num_views - master_count; + const secondary_count = if (num_views > master_count) num_views - master_count else 0; // to make things pixel-perfect, we make the first master and first secondary // view slightly larger if the height is not evenly divisible |
