Fixed latin1 to UTF-8 conversion (sign conversion was broken).
authorRyan C. Gordon <icculus@icculus.org>
Wed, 03 Jun 2009 18:44:15 -0400
changeset 998 974b90b56c43
parent 997 1c207582d809
child 999 54f5a2e925ac
Fixed latin1 to UTF-8 conversion (sign conversion was broken).
src/physfs_unicode.c
--- a/src/physfs_unicode.c	Sun May 03 01:36:18 2009 -0700
+++ b/src/physfs_unicode.c	Wed Jun 03 18:44:15 2009 -0400
@@ -308,7 +308,7 @@
     len--;  \
     while (len) \
     { \
-        const PHYSFS_uint32 cp = (PHYSFS_uint32) *(src++); \
+        const PHYSFS_uint32 cp = (PHYSFS_uint32) ((typ) (*(src++))); \
         if (cp == 0) break; \
         utf8fromcodepoint(cp, &dst, &len); \
     } \