Skip to content

Commit

Permalink
Update ext/mbstring/libmbfl/mbfl/mbfl_encoding.c
Browse files Browse the repository at this point in the history
Co-authored-by: Niels Dossche <[email protected]>
  • Loading branch information
youkidearitai and nielsdos authored Sep 10, 2024
1 parent 3eb89d5 commit 21970ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/mbstring/libmbfl/mbfl/mbfl_encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ const mbfl_encoding *mbfl_name2encoding_ex(const char *name, size_t name_len)
for (encoding = mbfl_encoding_ptr_list; *encoding; encoding++) {
if ((*encoding)->aliases) {
for (const char **alias = (*encoding)->aliases; *alias; alias++) {
if (strncasecmp(name, *alias, name_len) == 0 && strlen(*alias) == name_len) {
if (strncasecmp(name, *alias, name_len) == 0 && (*alias)[name_len] == '\0') {
return *encoding;
}
}
Expand Down

0 comments on commit 21970ab

Please sign in to comment.