summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/binarybuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c
index 6afd6e59..7d41dc73 100644
--- a/src/helper/binarybuffer.c
+++ b/src/helper/binarybuffer.c
@@ -143,8 +143,8 @@ int buf_cmp_mask(u8 *buf1, u8 *buf2, u8 *mask, int size)
/* mask out bits that don't really belong to the buffer if size isn't a multiple of 8 bits */
if ((size % 8) && (i == num_bytes -1 ))
{
- if (((buf1[i] & ((1 << (size % 8)) - 1)) & ((1 << (size % 8)) - 1)) !=
- ((buf2[i] & ((1 << (size % 8)) - 1)) & ((1 << (size % 8)) - 1)))
+ if ((buf1[i] & ((1 << (size % 8)) - 1) & mask[i]) !=
+ (buf2[i] & ((1 << (size % 8)) - 1) & mask[i]))
return 1;
}
else