From eede8ccffc1a831f4de89403edc8dffd52494e8b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 25 Oct 2011 15:43:38 +1000 Subject: Don't crop long value from EvdevBitIsSet. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Jeremy Huddleston --- src/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/evdev.c') diff --git a/src/evdev.c b/src/evdev.c index f99e0d5..028a9e1 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -176,7 +176,7 @@ static size_t EvdevCountBits(unsigned long *array, size_t nlongs) static inline int EvdevBitIsSet(const unsigned long *array, int bit) { - return array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS)); + return !!(array[bit / LONG_BITS] & (1LL << (bit % LONG_BITS))); } static inline void EvdevSetBit(unsigned long *array, int bit) -- cgit v1.2.3