szn

Bug 328 — Format string truncation specifier slices UTF-8 codepoints

328. Format string truncation specifier slices UTF-8 codepoints

File: src/format.zig:720-745 Severity: MEDIUM Status: ✅ FIXED

Format string truncation in src/format.zig sliced raw byte indices [0..n], breaking multi-byte UTF-8 codepoints.

Root Cause

Byte-based slicing instead of UTF-8 codepoint boundary iteration.

Fix

Updated appendTruncated in src/format.zig to slice strings strictly at UTF-8 codepoint boundaries.