소스 검색

SDL_utf8strlen: run bit-test explicitly on unsigned char

Ozkan Sezer 4 년 전
부모
커밋
507d4bcd68
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/stdlib/SDL_string.c

+ 1 - 1
src/stdlib/SDL_string.c

@@ -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. */