mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 20:38:36 -07:00
Fix nfc and fuzzer dynamic naming
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include <assets_icons.h>
|
||||
|
||||
#define FUZZ_TIME_DELAY_MAX (80)
|
||||
#define KEY_NAME_SIZE 22
|
||||
#define KEY_NAME_SIZE 24
|
||||
|
||||
typedef struct {
|
||||
const char* custom_dict_extension;
|
||||
|
||||
@@ -25,7 +25,7 @@ void nfc_scene_save_name_on_enter(void* context) {
|
||||
furi_string_replace_all(prefix, " ", "_");
|
||||
furi_string_left(prefix, 12);
|
||||
name_generator_make_auto(
|
||||
nfc->text_store, NFC_DEV_NAME_MAX_LEN, furi_string_get_cstr(prefix));
|
||||
nfc->text_store, sizeof(nfc->text_store), furi_string_get_cstr(prefix));
|
||||
furi_string_free(prefix);
|
||||
dev_name_empty = true;
|
||||
} else {
|
||||
@@ -37,7 +37,7 @@ void nfc_scene_save_name_on_enter(void* context) {
|
||||
nfc_scene_save_name_text_input_callback,
|
||||
nfc,
|
||||
nfc->text_store,
|
||||
NFC_DEV_NAME_MAX_LEN,
|
||||
sizeof(nfc->text_store),
|
||||
dev_name_empty);
|
||||
|
||||
FuriString* folder_path;
|
||||
@@ -71,7 +71,7 @@ bool nfc_scene_save_name_on_event(void* context, SceneManagerEvent event) {
|
||||
(!scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSetTypeMfUid))) {
|
||||
nfc->dev->dev_data.nfc_data = nfc->dev_edit_data;
|
||||
}
|
||||
strlcpy(nfc->dev->dev_name, nfc->text_store, strlen(nfc->text_store) + 1);
|
||||
strlcpy(nfc->dev->dev_name, nfc->text_store, sizeof(nfc->dev->dev_name));
|
||||
if(nfc_save_file(nfc)) {
|
||||
scene_manager_next_scene(nfc->scene_manager, NfcSceneSaveSuccess);
|
||||
if(!scene_manager_has_previous_scene(nfc->scene_manager, NfcSceneSavedMenu)) {
|
||||
|
||||
Reference in New Issue
Block a user