From 5d576ce61deb0bf46df8b503cda75fd41c44acca Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 22 Jun 2015 19:51:13 +0200 Subject: [PATCH] (task_database.c) Use fill_pathname_join_delim in task_database.c --- libretro-common/file/file_path.c | 2 +- tasks/task_database.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libretro-common/file/file_path.c b/libretro-common/file/file_path.c index e7de836e87..6fdd03cb7b 100644 --- a/libretro-common/file/file_path.c +++ b/libretro-common/file/file_path.c @@ -678,7 +678,7 @@ void fill_pathname_join_delim(char *out_path, const char *dir, size_t copied = strlcpy(out_path, dir, size); rarch_assert(copied < size+1); - out_path[copied]=delim; + out_path[copied] = delim; out_path[copied+1] = '\0'; rarch_assert(strlcat(out_path, path, size) < size); diff --git a/tasks/task_database.c b/tasks/task_database.c index b2a5efa7da..9c93ca8129 100644 --- a/tasks/task_database.c +++ b/tasks/task_database.c @@ -188,11 +188,10 @@ static int database_info_list_iterate_found_match( snprintf(db_crc, sizeof(db_crc), "%08X|crc", db_info_entry->crc32); strlcpy(entry_path_str, entry_path, sizeof(entry_path_str)); + if (zip_name && zip_name[0] != '\0') - { - strlcat(entry_path_str, "#", sizeof(entry_path_str)); - strlcat(entry_path_str, zip_name, sizeof(entry_path_str)); - } + fill_pathname_join_delim(entry_path_str, entry_path_str, zip_name, + '#', sizeof(entry_path_str)); #if 0 RARCH_LOG("Found match in database !\n");