summaryrefslogtreecommitdiff
path: root/bitncmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bitncmp.c')
-rw-r--r--bitncmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitncmp.c b/bitncmp.c
index b9077ba..3089186 100644
--- a/bitncmp.c
+++ b/bitncmp.c
@@ -41,7 +41,7 @@ ares_bitncmp(const void *l, const void *r, int n) {
b = n / 8;
x = memcmp(l, r, b);
- if (x)
+ if (x || (n % 8) == 0)
return (x);
lb = ((const unsigned char *)l)[b];