From 0f19251aa6bc494a173af3077aaaa85714fe1a1e Mon Sep 17 00:00:00 2001 From: em-dash <33614480+em-dash@users.noreply.github.com> Date: Sat, 24 Feb 2024 20:49:51 +1100 Subject: [PATCH] fix crash in underline drawing math --- src/font/sprite/underline.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/font/sprite/underline.zig b/src/font/sprite/underline.zig index 55a29d80c..163a8fb78 100644 --- a/src/font/sprite/underline.zig +++ b/src/font/sprite/underline.zig @@ -80,7 +80,7 @@ const Draw = struct { // Ensure we never overflow out of bounds on the canvas const y_max = self.height -| 1; const bottom = @min(self.pos + self.thickness, y_max); - const y = @as(i32, @intCast(bottom - self.thickness)); + const y = @as(i32, @intCast(bottom)) - @as(i32, @intCast(self.thickness)); canvas.rect(.{ .x = 0,