this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

scrollbar: fix integer overflow

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>

+1 -1
+1 -1
src/Scrollbar.zig
··· 29 29 const bar_height = @max(std.math.divCeil(usize, self.view_size * win.height, self.total) catch unreachable, 1); 30 30 31 31 // The row of the last cell of the bottom of the bar 32 - const bar_bottom = (win.height - 1) - (std.math.divCeil(usize, self.bottom * win.height, self.total) catch unreachable); 32 + const bar_bottom = (win.height - 1) -| (std.math.divCeil(usize, self.bottom * win.height, self.total) catch unreachable); 33 33 34 34 var i: usize = 0; 35 35 while (i <= bar_height) : (i += 1)