diff --git a/src/physfs_unicode.c b/src/physfs_unicode.c index 3de76ff..4bc07db 100644 --- a/src/physfs_unicode.c +++ b/src/physfs_unicode.c @@ -308,7 +308,7 @@ static void utf8fromcodepoint(PHYSFS_uint32 cp, char **_dst, PHYSFS_uint64 *_len 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); \ } \