diff options
author | Chris Robinson <[email protected]> | 2014-10-13 07:04:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-10-13 07:04:36 -0700 |
commit | 87dcf65013d363989c989a9f749bb31a126c28da (patch) | |
tree | 6508b2a30bc57179f98959b5bde7bbc1cb6464b5 /Alc | |
parent | 84582ceb030794f67858bbae3efffb9865eae117 (diff) |
Use the minimum of the two string lengths for comparison
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index 8c9b1a4b..8407a8d3 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -726,7 +726,7 @@ void al_string_clear(al_string *str) static inline int al_string_compare(const al_string_char_type *str1, size_t str1len, const al_string_char_type *str2, size_t str2len) { - size_t complen = (str1len > str2len) ? str1len : str2len; + size_t complen = (str1len < str2len) ? str1len : str2len; int ret = memcmp(str1, str2, complen); if(ret == 0) { |