685137d5f5
If no character matches the typed character, the loop should exit when `lb->citem == cc`, which should happen after every entry is visited once. However, if no item is selected, `lb->citem == -1`, and `cc` is never `-1`, so the exit path never triggers. Rewrite the loop to be bounded by number of steps, rather than bounded by returning to a particular offset. This also protects against undefined behavior if the menu had zero elements. |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
main | ||
misc |