From 13c85c5aeacd9c1340175cd9ebb037436a3060e9 Mon Sep 17 00:00:00 2001 From: skarg Date: Sun, 1 Jan 2017 05:23:51 +0000 Subject: [PATCH] Fixed the BITMASK_CHECK macro to actually compare to the mask. --- bacnet-stack/include/bits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bacnet-stack/include/bits.h b/bacnet-stack/include/bits.h index 90fae4b5..cf10533f 100644 --- a/bacnet-stack/include/bits.h +++ b/bacnet-stack/include/bits.h @@ -71,7 +71,7 @@ #define BITMASK_SET(x,y) ((x) |= (y)) #define BITMASK_CLEAR(x,y) ((x) &= (~(y))) #define BITMASK_FLIP(x,y) ((x) ^= (y)) -#define BITMASK_CHECK(x,y) ((x) & (y)) +#define BITMASK_CHECK(x,y) (((x) & (y)) == (y)) #ifndef _BV #define _BV(x) (1<<(x))