--- rxvt-unicode/src/keyboard.C 2012/05/18 00:10:47 1.59 +++ rxvt-unicode/src/keyboard.C 2012/12/28 13:29:05 1.60 @@ -82,12 +82,7 @@ int ca = ecb_popcount32 (a->state /* & OtherModMask */); int cb = ecb_popcount32 (b->state /* & OtherModMask */); - if (ca != cb) - return ca - cb; -//else if (a->state != b->state) // this behavior is to be discussed -// return b->state - a->state; - else - return 0; + return ca - cb; } //////////////////////////////////////////////////////////////////////////////// @@ -183,15 +178,14 @@ // now we know the size of each bucket // compute the index of each bucket - hash [0] = 0; - for (index = 0, i = 1; i < KEYSYM_HASH_BUCKETS; ++i) + for (index = 0, i = 0; i < KEYSYM_HASH_BUCKETS; ++i) { - index += hash_bucket_size [i - 1]; hash [i] = index; + index += hash_bucket_size [i]; } // and allocate just enough space - simplevec sorted_keymap (index + hash_bucket_size [i - 1], 0); + simplevec sorted_keymap (index, 0); memset (hash_bucket_size, 0, sizeof (hash_bucket_size));