fixed wrong result of buffer_caseless_compare("a", "ab") (fixes #1287)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1927 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.17
parent
1920bd2739
commit
5f518191bd
|
@ -574,7 +574,13 @@ int buffer_caseless_compare(const char *a, size_t a_len, const char *b, size_t b
|
|||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
/* all chars are the same, and the length match too
|
||||
*
|
||||
* they are the same */
|
||||
if (a_len == b_len) return 0;
|
||||
|
||||
/* if a is shorter then b, then b is larger */
|
||||
return (a_len - b_len);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue