From cda44998d85b46febb1736d81d26ab7c6a949cc1 Mon Sep 17 00:00:00 2001 From: acegoal07 Date: Fri, 12 Apr 2024 21:17:51 +0100 Subject: [PATCH] Just some small tweaks - These tweaks make the app work on momentum firmware --- scenes/nfc_playlist_scene_emulation.c | 1 - scenes/nfc_playlist_scene_name_new_file.c | 2 +- scenes/nfc_playlist_scene_playlist_select.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scenes/nfc_playlist_scene_emulation.c b/scenes/nfc_playlist_scene_emulation.c index de99bd9d761..e7ba6c6821f 100644 --- a/scenes/nfc_playlist_scene_emulation.c +++ b/scenes/nfc_playlist_scene_emulation.c @@ -88,7 +88,6 @@ int32_t nfc_playlist_emulation_task(void* context) { nfc_playlist_worker_stop(nfc_playlist->nfc_playlist_worker); nfc_playlist_worker_clear_nfc_data(nfc_playlist->nfc_playlist_worker); } - free(file_path); } popup_reset(nfc_playlist->popup); popup_set_header(nfc_playlist->popup, EmulationState == NfcPlaylistEmulationState_Canceled ? "Emulation stopped" : "Emulation finished", 64, 10, AlignCenter, AlignTop); diff --git a/scenes/nfc_playlist_scene_name_new_file.c b/scenes/nfc_playlist_scene_name_new_file.c index 70502af4743..9425a6a6b2b 100644 --- a/scenes/nfc_playlist_scene_name_new_file.c +++ b/scenes/nfc_playlist_scene_name_new_file.c @@ -11,7 +11,7 @@ void nfc_playlist_name_new_file_menu_callback(void* context) { File* file = storage_file_alloc(storage); if (storage_file_open(file, furi_string_get_cstr(file_name), FSAM_READ_WRITE, FSOM_CREATE_NEW)) { storage_file_close(file); - furi_string_move(nfc_playlist->settings.file_path, file_name); + furi_string_swap(nfc_playlist->settings.file_path, file_name); } storage_file_free(file); } diff --git a/scenes/nfc_playlist_scene_playlist_select.c b/scenes/nfc_playlist_scene_playlist_select.c index fc04e99f1ce..7b65725a1a2 100644 --- a/scenes/nfc_playlist_scene_playlist_select.c +++ b/scenes/nfc_playlist_scene_playlist_select.c @@ -2,7 +2,7 @@ void nfc_playlist_playlist_select_menu_callback(void* context) { NfcPlaylist* nfc_playlist = context; - furi_string_move(nfc_playlist->settings.file_path, nfc_playlist->file_browser_output); + furi_string_swap(nfc_playlist->settings.file_path, nfc_playlist->file_browser_output); furi_string_reset(nfc_playlist->file_browser_output); scene_manager_previous_scene(nfc_playlist->scene_manager); }