Browse Source

better readability..

Ozkan Sezer 6 years ago
parent
commit
2ea0ec6207
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/stdlib/SDL_string.c

+ 1 - 1
src/stdlib/SDL_string.c

@@ -549,7 +549,7 @@ SDL_utf8strlen(const char *str)
     const char *p = str;
     const char *p = str;
     char ch;
     char ch;
 
 
-    while ((ch = *(p++))) {
+    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. */
         if ((ch & 0xc0) != 0x80) {
         if ((ch & 0xc0) != 0x80) {
             retval++;
             retval++;