szn

Bug 473 — Screen sixel geometry casts u32 height to i32 and can panic

473. Narrowing height cast on the sixel path

Severity: LOW Status: ✅ FIXED Files: src/screen.zig


Root Cause Analysis

In src/screen.zig:588:

if (img.anchor_row >= @as(i32, @intCast(height)) ...

Same pattern at :343,348,1113-1114. height > INT32_MAX panics in safe builds; heights are small today but the comparison should not narrow.

Proposed Fix

Compare in i64/u32 domain (widen anchor_row instead of narrowing height).