shitty hack to fix out of bounds with -v

xkbcommon
Alessandro Mauri 4 years ago
parent 1ba688f975
commit 689e6005ac
  1. 5
      hkd.c

@ -335,8 +335,11 @@ int main (int argc, char *argv[])
printf("Pressed keys: "); printf("Pressed keys: ");
for (unsigned int i = 0; i < pb.size; i++) { for (unsigned int i = 0; i < pb.size; i++) {
ci = i; ci = i;
while (pb.buf[i] != key_conversion_table[ci + 1].value) while (pb.buf[i] != key_conversion_table[ci + 1].value) {
if (ci >= array_size_const(key_conversion_table) - 2)
break;
ci++; ci++;
}
printf("%s ", key_conversion_table[ci + 1].name); printf("%s ", key_conversion_table[ci + 1].name);
} }
putchar('\n'); putchar('\n');

Loading…
Cancel
Save