(core_info/UWP) Use non-heap based versions for string_list

This commit is contained in:
twinaphex 2020-08-26 18:43:19 +02:00
parent 61c94fe248
commit 6478d20e55

View File

@ -277,12 +277,16 @@ static core_info_list_t *core_info_list_new(const char *path,
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
{ {
/* UWP: browse the optional packages for additional cores */ /* UWP: browse the optional packages for additional cores */
struct string_list *core_packages = string_list_new(); struct string_list core_packages = {0};
uwp_fill_installed_core_packages(core_packages);
for (i = 0; i < core_packages->size; i++) if (string_list_initialize(&core_packages))
dir_list_append(&contents, core_packages->elems[i].data, exts, {
false, dir_show_hidden_files, false, false); uwp_fill_installed_core_packages(&core_packages);
string_list_free(core_packages); for (i = 0; i < core_packages.size; i++)
dir_list_append(&contents, core_packages.elems[i].data, exts,
false, dir_show_hidden_files, false, false);
string_list_deinitialize(&core_packages);
}
} }
#else #else
/* Keep the old 'directory not found' behavior */ /* Keep the old 'directory not found' behavior */