summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 5403816..da4df93 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -46,7 +46,7 @@ int strncasecmp(const char *s1, const char *s2, size_t len)
if (s1 == s2)
return 0;
- while (len-- && (i = tolower(*s1)) && i == tolower(*s2))
+ while (--len && (i = tolower(*s1)) && i == tolower(*s2))
s1++, s2++;
return ((unsigned char) tolower(*s1) - (unsigned char) tolower(*s2));