From 310599f73ac3e291ce99dc64ae9857fbf75956a0 Mon Sep 17 00:00:00 2001 From: Willy-JL <49810075+Willy-JL@users.noreply.github.com> Date: Thu, 20 Jul 2023 17:05:08 +0100 Subject: [PATCH] Misc xtreme app fixes --- applications/main/xtreme_app/xtreme_app.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applications/main/xtreme_app/xtreme_app.c b/applications/main/xtreme_app/xtreme_app.c index 444341a87..3e6b50a5b 100644 --- a/applications/main/xtreme_app/xtreme_app.c +++ b/applications/main/xtreme_app/xtreme_app.c @@ -19,7 +19,7 @@ bool xtreme_app_apply(XtremeApp* app) { if(file_stream_open(stream, XTREME_APPS_PATH, FSAM_READ_WRITE, FSOM_CREATE_ALWAYS)) { CharList_it_t it; CharList_it(it, app->mainmenu_app_paths); - for(uint i = 0; i < CharList_size(app->mainmenu_app_paths); i++) { + for(size_t i = 0; i < CharList_size(app->mainmenu_app_paths); i++) { stream_write_format(stream, "%s\n", *CharList_get(app->mainmenu_app_paths, i)); } } @@ -204,9 +204,8 @@ XtremeApp* xtreme_app_alloc() { if(storage_dir_open(folder, XTREME_ASSETS_PATH)) { while(storage_dir_read(folder, &info, name, XTREME_ASSETS_PACK_NAME_LEN)) { if(info.flags & FSF_DIRECTORY) { - char* copy = malloc(XTREME_ASSETS_PACK_NAME_LEN); - strlcpy(copy, name, XTREME_ASSETS_PACK_NAME_LEN); - uint idx = 0; + char* copy = strdup(name); + size_t idx = 0; if(strcmp(copy, "NSFW") != 0) { for(; idx < CharList_size(app->asset_pack_names); idx++) { char* comp = *CharList_get(app->asset_pack_names, idx);