Fix read of uninitialized memory (#2596)
Previous code was reading whole array, it was slower and it read uninitialized memory
This commit is contained in:
parent
d7dcef61d7
commit
05a2270eb7
|
@ -981,7 +981,7 @@ int *bindings_get_buttons_to_grab(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Avoid duplicates. */
|
/* Avoid duplicates. */
|
||||||
for (int i = 0; i < num_max; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
if (buffer[i] == button)
|
if (buffer[i] == button)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue