Skip to content

Commit

Permalink
Merge pull request #234 from darktiny/fix_menu_items
Browse files Browse the repository at this point in the history
Fix __f08_menu_items index 1 never used
  • Loading branch information
jtothebell authored Apr 17, 2024
2 parents 5a480cb + 1dde0b7 commit c6fffb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/p8GlobalLuaFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ function menuitem(index, label, callback)
callback = nil
end
__f08_menu_items[index + 1][1] = label
__f08_menu_items[index + 1][2] = callback
__f08_menu_items[index][1] = label
__f08_menu_items[index][2] = callback
end
function __addbreadcrumb(label, carttoload)
Expand Down Expand Up @@ -185,7 +185,7 @@ function __f08_menu_update()
until __f08_menu_items[__f08_menu_selected][1] ~= nil
end
if btnp(2) and __f08_menu_selected > 1 then
if btnp(2) and __f08_menu_selected > 0 then
repeat
__f08_menu_selected = __f08_menu_selected - 1
until __f08_menu_items[__f08_menu_selected][1] ~= nil
Expand Down

0 comments on commit c6fffb8

Please sign in to comment.