Skip to content

Commit 5874d1b

Browse files
committed
unicode: Minor tweak to PHYSFS_caseFold.
We assign `*to = from` at the end of the function, so only return early from the low-ASCII case if we actual did a conversion.
1 parent 255b101 commit 5874d1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/physfs_unicode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,10 @@ int PHYSFS_caseFold(const PHYSFS_uint32 from, PHYSFS_uint32 *to)
442442
if (from < 128) /* low-ASCII, easy! */
443443
{
444444
if ((from >= 'A') && (from <= 'Z'))
445+
{
445446
*to = from - ('A' - 'a');
446-
else
447-
*to = from;
448-
return 1;
447+
return 1;
448+
} /* if */
449449
} /* if */
450450

451451
else if (from <= 0xFFFF)

0 commit comments

Comments
 (0)