diff --git a/src/buffer.c b/src/buffer.c index 094cee20..c7f547c2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -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); }