Skip to content

Commit

Permalink
Fix ktx_strncasecmp (KhronosGroup#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
Császár Mátyás authored Jul 17, 2023
1 parent 300514d commit beb1773
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mkvkformatfiles
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ END {
begin_str2vk = begin_str2vk " ++us2;\n"
begin_str2vk = begin_str2vk " --length;\n"
begin_str2vk = begin_str2vk " }\n"
begin_str2vk = begin_str2vk " if (length == 0)\n"
begin_str2vk = begin_str2vk " return 0;\n"
begin_str2vk = begin_str2vk " return tolower(*us1) - tolower(*us2);\n"
begin_str2vk = begin_str2vk "}\n"
begin_str2vk = begin_str2vk "\n"
Expand Down
2 changes: 2 additions & 0 deletions lib/vkformat_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ static int ktx_strncasecmp(const char* s1, const char* s2, int length) {
++us2;
--length;
}
if (length == 0)
return 0;
return tolower(*us1) - tolower(*us2);
}

Expand Down

0 comments on commit beb1773

Please sign in to comment.