Explorar o código

Fixed bug that does not allow adding new stages after deleting the last one from the list

tcpassos %!s(int64=2) %!d(string=hai) anos
pai
achega
0ebe7a8a5e

+ 2 - 0
applications/external/wifi_marauder_companion/scenes/wifi_marauder_scene_script_stage_edit.c

@@ -116,12 +116,14 @@ static void wifi_marauder_scene_script_stage_edit_list_enter_callback(void* cont
                     previous_stage->next_stage = current_stage->next_stage;
                     previous_stage->next_stage = current_stage->next_stage;
                 } else {
                 } else {
                     previous_stage->next_stage = NULL;
                     previous_stage->next_stage = NULL;
+                    app->script->last_stage = previous_stage;
                 }
                 }
             } else {
             } else {
                 if (current_stage->next_stage != NULL) {
                 if (current_stage->next_stage != NULL) {
                     app->script->first_stage = current_stage->next_stage;
                     app->script->first_stage = current_stage->next_stage;
                 } else {
                 } else {
                     app->script->first_stage = NULL;
                     app->script->first_stage = NULL;
+                    app->script->last_stage = NULL;
                 }
                 }
             }
             }
         }
         }