The per-game override store keyed and persisted image names through narrow(), which masked each character with & 0x7F, and widen() used the full byte -- not a true inverse. So a non-ASCII exe name was corrupted on reload, and two names differing only in their high bits collapsed onto the same key (e.g. U+00E9 'é' masked to 'i', so "café.exe" collided with "cafi.exe"). Use real WideCharToMultiByte/MultiByteToWideChar(CP_UTF8) so the round-trip is lossless for any Unicode name. ASCII names are byte-identical under UTF-8, so existing override files stay compatible. audio_overrides_test gains a high-bit-collision case (café vs cafi, built from a code point to keep the source ASCII) plus a non-ASCII persist/reload check -- both of which the old 7-bit mask failed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3.5 KiB
3.5 KiB