[util] Fix UTF8 encodeTypedChar for 4 byte chars

Some flipped logic here...
This commit is contained in:
Joshua Ashton 2023-06-10 12:21:41 +01:00 committed by Philip Rebohle
parent f3fb5ba320
commit 3fddc364ee
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ namespace dxvk::str {
return 3;
} else if (ch < 0x200000) {
if (begin) {
if (unlikely(begin + 4 < end))
if (unlikely(begin + 4 > end))
return 0;
begin[0] = uint8_t(0xF0 | ((ch >> 18)));