Skip to content

Commit f387a6a

Browse files
committed
Just some tweaks
1 parent f7d6f3c commit f387a6a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

scenes/nfc_playlist_scene_file_rename.c

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ void nfc_playlist_file_rename_menu_callback(void* context) {
1717
storage_common_rename_safe(storage, furi_string_get_cstr(nfc_playlist->settings.file_path), furi_string_get_cstr(tmp_new_file_path));
1818
nfc_playlist->settings.file_path = furi_string_alloc_set_str(furi_string_get_cstr(tmp_new_file_path));
1919
}
20+
2021
furi_record_close(RECORD_STORAGE);
2122
furi_string_free(tmp_new_file_path);
2223
furi_string_free(tmp_old_file_path);

scenes/nfc_playlist_scene_name_new_file.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ void nfc_playlist_name_new_file_menu_callback(void* context) {
2323

2424
void nfc_playlist_name_new_file_scene_on_enter(void* context) {
2525
NfcPlaylist* nfc_playlist = context;
26-
nfc_playlist->text_input_output = (char*)malloc(50);
26+
nfc_playlist->text_input_output = (char*)malloc(50*sizeof(char));
2727
text_input_set_header_text(nfc_playlist->text_input, "Enter file name");
2828
text_input_set_minimum_length(nfc_playlist->text_input, 1);
29-
text_input_set_result_callback(nfc_playlist->text_input, nfc_playlist_name_new_file_menu_callback, nfc_playlist, nfc_playlist->text_input_output, 50, true);
29+
text_input_set_result_callback(nfc_playlist->text_input, nfc_playlist_name_new_file_menu_callback, nfc_playlist, nfc_playlist->text_input_output, 50*sizeof(char), true);
3030

3131
view_dispatcher_switch_to_view(nfc_playlist->view_dispatcher, NfcPlaylistView_TextInput);
3232
}

0 commit comments

Comments
 (0)