mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 13:18:35 -07:00
Fix crash on frequency remove for leftmost index
This commit is contained in:
@@ -87,7 +87,7 @@ bool momentum_app_scene_protocols_freqs_hopper_on_event(void* context, SceneMana
|
||||
variable_item_list_get(app->var_item_list, VarItemListIndexHopperFrequency);
|
||||
variable_item_set_values_count(item, FrequencyList_size(app->subghz_hopper_freqs));
|
||||
if(FrequencyList_size(app->subghz_hopper_freqs)) {
|
||||
app->subghz_hopper_index -= removed;
|
||||
app->subghz_hopper_index -= MIN(removed, app->subghz_hopper_index);
|
||||
uint32_t value =
|
||||
*FrequencyList_get(app->subghz_hopper_freqs, app->subghz_hopper_index);
|
||||
char text[10] = {0};
|
||||
|
||||
@@ -87,7 +87,7 @@ bool momentum_app_scene_protocols_freqs_static_on_event(void* context, SceneMana
|
||||
variable_item_list_get(app->var_item_list, VarItemListIndexStaticFrequency);
|
||||
variable_item_set_values_count(item, FrequencyList_size(app->subghz_static_freqs));
|
||||
if(FrequencyList_size(app->subghz_static_freqs)) {
|
||||
app->subghz_static_index -= removed;
|
||||
app->subghz_static_index -= MIN(removed, app->subghz_static_index);
|
||||
uint32_t value =
|
||||
*FrequencyList_get(app->subghz_static_freqs, app->subghz_static_index);
|
||||
char text[10] = {0};
|
||||
|
||||
Reference in New Issue
Block a user