diff --git a/core_info.c b/core_info.c index b9cde94b77..1d91ecd444 100644 --- a/core_info.c +++ b/core_info.c @@ -59,6 +59,8 @@ static void core_info_list_resolve_all_extensions( (strlen(core_info_list->list[i].supported_extensions) + 2); } + all_ext_len += strlen("7z|") + strlen("zip|"); + if (all_ext_len) all_ext = (char*)calloc(1, all_ext_len); @@ -77,10 +79,10 @@ static void core_info_list_resolve_all_extensions( strlcat(core_info_list->all_ext, "|", all_ext_len); } #ifdef HAVE_7ZIP - strlcat(core_info_list->all_ext, "7z|", all_ext_len + 3); + strlcat(core_info_list->all_ext, "7z|", all_ext_len); #endif #ifdef HAVE_ZLIB - strlcat(core_info_list->all_ext, "zip|", all_ext_len + 4); + strlcat(core_info_list->all_ext, "zip|", all_ext_len); #endif }