Fix a hidden bug (#393)

The way it works right know the bug should not effect the user at the end, but if you changed any other part of the code, it might. So better do this right. ;)
This commit is contained in:
jonnius 2018-02-25 11:28:25 +01:00 committed by TheOfficialFloW
parent 2664a22d4c
commit 2e131bc571

2
main.c
View File

@ -1514,7 +1514,7 @@ static int fileBrowserMenuCtrl() {
} else if (hold_pad[PAD_DOWN] || hold2_pad[PAD_LEFT_ANALOG_DOWN]) {
int old_pos = base_pos + rel_pos;
if ((rel_pos + 1) < file_list.length) {
if ((old_pos + 1) < file_list.length) {
if ((rel_pos + 1) < MAX_POSITION) {
rel_pos++;
} else if ((base_pos + rel_pos + 1) < file_list.length) {