mirror of
https://github.com/encounter/SDL.git
synced 2025-05-22 15:21:27 +00:00
SDL_utf8strlen: run bit-test explicitly on unsigned char
This commit is contained in:
parent
82fc67ae4d
commit
507d4bcd68
@ -670,7 +670,7 @@ SDL_utf8strlen(const char *str)
|
||||
{
|
||||
size_t retval = 0;
|
||||
const char *p = str;
|
||||
char ch;
|
||||
unsigned char ch;
|
||||
|
||||
while ((ch = *(p++)) != 0) {
|
||||
/* if top two bits are 1 and 0, it's a continuation byte. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user