From 8ebb8470b73521a1d3ce5aa5716d68b5c1ee3bd1 Mon Sep 17 00:00:00 2001 From: Jacob Sandlund Date: Wed, 7 Jan 2026 10:46:01 -0500 Subject: [PATCH] Fix unsigned subtraction from zero --- src/font/shaper/coretext.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/font/shaper/coretext.zig b/src/font/shaper/coretext.zig index c292104e2..b61c8a62d 100644 --- a/src/font/shaper/coretext.zig +++ b/src/font/shaper/coretext.zig @@ -695,7 +695,7 @@ pub const Shaper = struct { const codepoints = state.codepoints.items; var last_cluster: ?u32 = null; for (codepoints, 0..) |cp, i| { - if ((cp.cluster >= cell_offset.cluster - 1 and + if ((@as(i32, @intCast(cp.cluster)) >= @as(i32, @intCast(cell_offset.cluster)) - 1 and cp.cluster <= cluster + 1) and cp.codepoint != 0 // Skip surrogate pair padding ) { @@ -718,7 +718,7 @@ pub const Shaper = struct { } try writer.writeAll(" → "); for (codepoints) |cp| { - if ((cp.cluster >= cell_offset.cluster - 1 and + if ((@as(i32, @intCast(cp.cluster)) >= @as(i32, @intCast(cell_offset.cluster)) - 1 and cp.cluster <= cluster + 1) and cp.codepoint != 0 // Skip surrogate pair padding ) {