--- rxvt-unicode/src/keyboard.C 2008/01/10 00:46:12 1.29 +++ rxvt-unicode/src/keyboard.C 2009/09/04 15:40:12 1.31 @@ -145,8 +145,8 @@ compare_priority (keysym_t *a, keysym_t *b) { // (the more '1's in state; the less range): the greater priority - int ca = popcount (a->state /* & OtherModMask */); - int cb = popcount (b->state /* & OtherModMask */); + int ca = rxvt_popcount (a->state /* & OtherModMask */); + int cb = rxvt_popcount (b->state /* & OtherModMask */); if (ca != cb) return ca - cb; @@ -454,8 +454,9 @@ assert (index >= 0); keysym_t *b = keymap [index]; - assert (i == (signed) index || // the normally expected result - (a->keysym + j) >= b->keysym && (a->keysym + j) <= (b->keysym + b->range) && compare_priority (a, b) <= 0); // is effectively the same or a closer match + assert (i == index // the normally expected result + || IN_RANGE_INC (a->keysym + j, b->keysym, b->keysym + b->range) + && compare_priority (a, b) <= 0); // is effectively the same or a closer match } } #endif