mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 14:58:36 -07:00
Merge remote-tracking branch 'ofw/dev' into mntm-dev
This commit is contained in:
@@ -83,8 +83,7 @@ static bool animation_storage_load_single_manifest_info(
|
||||
if(furi_string_cmp_str(read_string, name)) break;
|
||||
flipper_format_set_strict_mode(file, true);
|
||||
|
||||
manifest_info->name = malloc(furi_string_size(read_string) + 1);
|
||||
strcpy((char*)manifest_info->name, furi_string_get_cstr(read_string));
|
||||
manifest_info->name = strdup(furi_string_get_cstr(read_string));
|
||||
|
||||
if(!flipper_format_read_uint32(file, "Min butthurt", &u32value, 1)) break;
|
||||
manifest_info->min_butthurt = u32value;
|
||||
@@ -137,9 +136,7 @@ void animation_storage_fill_animation_list(StorageAnimationList_t* animation_lis
|
||||
storage_animation->manifest_info.name = NULL;
|
||||
|
||||
if(!flipper_format_read_string(file, "Name", read_string)) break;
|
||||
storage_animation->manifest_info.name = malloc(furi_string_size(read_string) + 1);
|
||||
strcpy(
|
||||
(char*)storage_animation->manifest_info.name, furi_string_get_cstr(read_string));
|
||||
storage_animation->manifest_info.name = strdup(furi_string_get_cstr(read_string));
|
||||
|
||||
if(!flipper_format_read_uint32(file, "Min butthurt", &u32value, 1)) break;
|
||||
storage_animation->manifest_info.min_butthurt = u32value;
|
||||
@@ -433,8 +430,7 @@ static bool animation_storage_load_bubbles(BubbleAnimation* animation, FlipperFo
|
||||
|
||||
furi_string_replace_all(str, "\\n", "\n");
|
||||
|
||||
FURI_CONST_ASSIGN_PTR(bubble->bubble.text, malloc(furi_string_size(str) + 1));
|
||||
strcpy((char*)bubble->bubble.text, furi_string_get_cstr(str));
|
||||
FURI_CONST_ASSIGN_PTR(bubble->bubble.text, strdup(furi_string_get_cstr(str)));
|
||||
|
||||
if(!flipper_format_read_string(ff, "AlignH", str)) break;
|
||||
if(!animation_storage_cast_align(str, (Align*)&bubble->bubble.align_h)) break;
|
||||
|
||||
@@ -226,9 +226,7 @@ static void rpc_system_storage_list_root(const PB_Main* request, void* context)
|
||||
response.content.storage_list_response.file[i].data = NULL;
|
||||
response.content.storage_list_response.file[i].size = 0;
|
||||
response.content.storage_list_response.file[i].type = PB_Storage_File_FileType_DIR;
|
||||
char* str = malloc(strlen(hard_coded_dirs[i]) + 1);
|
||||
strcpy(str, hard_coded_dirs[i]);
|
||||
response.content.storage_list_response.file[i].name = str;
|
||||
response.content.storage_list_response.file[i].name = strdup(hard_coded_dirs[i]);
|
||||
}
|
||||
|
||||
rpc_send_and_release(session, &response);
|
||||
|
||||
Reference in New Issue
Block a user