This commit is contained in:
twinaphex 2017-09-27 23:55:54 +02:00
parent e7d41f6ea7
commit f34250e38e

View File

@ -448,6 +448,7 @@ static bool content_file_init_extract(
) )
{ {
unsigned i; unsigned i;
char *new_path = NULL;
for (i = 0; i < content->size; i++) for (i = 0; i < content->size; i++)
{ {
@ -464,12 +465,13 @@ static bool content_file_init_extract(
continue; continue;
{ {
char *temp_content = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); char *temp_content = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
char *new_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); const char *valid_ext = special ?
const char *valid_ext = special ?
special->roms[i].valid_extensions : special->roms[i].valid_extensions :
content_ctx->valid_extensions; content_ctx->valid_extensions;
new_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
temp_content[0] = new_path[0] = '\0'; temp_content[0] = new_path[0] = '\0';
strlcpy(temp_content, path, strlcpy(temp_content, path,