mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-12 14:28:14 +00:00
SDL_utf8strlen: run bit-test explicitly on unsigned char
This commit is contained in:
@@ -670,7 +670,7 @@ SDL_utf8strlen(const char *str)
|
|||||||
{
|
{
|
||||||
size_t retval = 0;
|
size_t retval = 0;
|
||||||
const char *p = str;
|
const char *p = str;
|
||||||
char ch;
|
unsigned char ch;
|
||||||
|
|
||||||
while ((ch = *(p++)) != 0) {
|
while ((ch = *(p++)) != 0) {
|
||||||
/* if top two bits are 1 and 0, it's a continuation byte. */
|
/* if top two bits are 1 and 0, it's a continuation byte. */
|
||||||
|
Reference in New Issue
Block a user