RageUtil::UnicodeUpperLower: Prevent negative characters from segfaulting under GCC

This commit is contained in:
Gareth Francis
2024-04-10 14:09:10 -07:00
committed by teejusb
parent 65f33b5699
commit 7009a16dea
+1 -1
View File
@@ -1819,7 +1819,7 @@ void UnicodeUpperLower( wchar_t *p, std::size_t iLen, const unsigned char pMappi
wchar_t *pEnd = p + iLen;
while( p != pEnd )
{
if( *p < 256 )
if( *p >= 0 && *p < 256 )
*p = pMapping[*p];
++p;
}