5ab5a721
by Henri Verbeet at 2025-03-05T14:10:58+01:00
vkd3d-shader/spirv: Do not sign-extend *ptr in vkd3d_spirv_build_string().
"char" is (potentially) signed, so casting it to uint32_t will
sign-extend it. Because we use |= to assign it to "word", and don't
otherwise mask out the higher bits either, we effectively set subsequent
bytes in the same word to 0xff for input bytes > 0x7f. That potentially
includes the \0 terminator. For example, "é" (U+00e9) is "\xc3\xa9"
when encoded as UTF-8, and would get us 0xffffffc3 instead of
0x0000a9c3.