gui: Fix selector going out of bounds when right key is used

This commit is contained in:
joel16 2021-02-09 17:51:24 -05:00
parent af4b077f08
commit e69150d2b5

View File

@ -94,7 +94,8 @@ namespace GUI {
}
else if (*kDown & KEY_DRIGHT) {
item->selected = item->entries.size() - 1;
start = size - (max_entries - 1);
if ((item->entries.size() - 1) > max_entries)
start = size - (max_entries - 1);
}
if (*kDown & KEY_A) {