2009-02-17 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / spi-common / bitarray.h
index e93dbef..65021e2 100644 (file)
@@ -28,7 +28,7 @@
 
 #define BITARRAY_SEQ_TERM 0xffffffff
 
-#define BITARRAY_SET(p, n) ((p)[n/32] |= (1<<(n)))
+#define BITARRAY_SET(p, n) ((p)[n>>5] |= (1<<(n&31)))
 
 gint bitarray_to_seq(dbus_uint32_t *array, gint array_size, gint **out);
 dbus_uint32_t bitarray_from_seq(gint *seq, dbus_uint32_t **out);