szn

Bug 167 — server/render.zig — utf8Encode catch unreachable for combining codepoints

167. server/render.zig — utf8Encode catch unreachable for combining codepoints

File: src/server/render.zig:404, 411 Severity: MEDIUM Status: ✅ FIXED — replaced catch unreachable with catch continue for both comb1 and comb2.

const clen = std.unicode.utf8Encode(ccp1, &buf) catch unreachable;

If combiningCodepoint() returns a codepoint > 0x10FFFF (non-BMP surrogate or invalid), utf8Encode panics. This is triggered by corrupted grid data or edge-case combining character sequences.

Fix: Replace catch unreachable with catch continue to skip the invalid combining character.