Explorar el Código

add missing bit to UTF-16 surrogate pair conversion

alfadur hace 4 años
padre
commit
4d66ea5946
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/physfs_unicode.c

+ 1 - 1
src/physfs_unicode.c

@@ -210,7 +210,7 @@ static PHYSFS_uint32 utf16codepoint(const PHYSFS_uint16 **_str)
         else
         {
             src++;  /* eat the other surrogate. */
-            cp = (((cp - 0xD800) << 10) | (pair - 0xDC00));
+            cp = (0x10000 | ((cp - 0xD800) << 10) | (pair - 0xDC00));
         } /* else */
     } /* else if */