Skip to content

Commit

Permalink
Fix crash with too many APs on menu
Browse files Browse the repository at this point in the history
  • Loading branch information
justcallmekoko committed Nov 9, 2022
1 parent 648bc49 commit 7e37ef9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion esp32_marauder/MenuFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,12 @@ void MenuFunctions::RunSetup()
addNodes(&wifiAPMenu, text09, TFT_LIGHTGREY, NULL, 0, [this]() {
changeMenu(wifiAPMenu.parentMenu);
});
for (int i = 0; i < access_points->size(); i++) {
int menu_limit;
if (access_points->size() <= BUTTON_ARRAY_LEN)
menu_limit = access_points->size();
else
menu_limit = BUTTON_ARRAY_LEN;
for (int i = 0; i < menu_limit - 1; i++) {
addNodes(&wifiAPMenu, access_points->get(i).essid, TFT_CYAN, NULL, KEYBOARD_ICO, [this, i](){
AccessPoint new_ap = access_points->get(i);
new_ap.selected = !access_points->get(i).selected;
Expand Down
6 changes: 3 additions & 3 deletions esp32_marauder/configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#define POLISH_POTATO

//#define MARAUDER_MINI
#define MARAUDER_V4
//#define MARAUDER_V4
//#define MARAUDER_V6
//#define MARAUDER_KIT
//#define GENERIC_ESP32
//#define MARAUDER_FLIPPER
#define MARAUDER_FLIPPER

#define MARAUDER_VERSION "v0.9.17"
#define MARAUDER_VERSION "v0.9.18"

//// BUTTON DEFINITIONS
#ifdef MARAUDER_MINI
Expand Down

0 comments on commit 7e37ef9

Please sign in to comment.