From d5b63ccd516f9683833751f3ff34f6ebec712821 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Sat, 3 Jan 2026 21:18:05 -0800 Subject: [PATCH] avoid integer underflow when negative --- src/render/formatted.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/formatted.zig b/src/render/formatted.zig index c0f135c..66949cb 100644 --- a/src/render/formatted.zig +++ b/src/render/formatted.zig @@ -190,7 +190,7 @@ fn renderHourlyCell(w: *std.Io.Writer, hour: types.HourlyForecast, line: usize, const buffered = cell_writer.buffered(); const display_width = art_width + buffered.len - counting_writer.invisible_bytes; try w.writeAll(buffered); - try w.splatByteAll(' ', @max(total_width - display_width, 0)); + try w.splatByteAll(' ', @max(@as(isize, total_width) - @as(isize, @intCast(display_width)), 0)); } const DateFormat = enum {