Don't crop long value from EvdevBitIsSet.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
master
Peter Hutterer 15 years ago
parent 2aba790ed3
commit eede8ccffc
  1. 2
      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)

Loading…
Cancel
Save