diff --git a/runloop_data.c b/runloop_data.c index a5bcc9eb69..1647cd0ae8 100644 --- a/runloop_data.c +++ b/runloop_data.c @@ -17,6 +17,7 @@ #ifdef HAVE_THREADS #include #endif +#include #include "general.h" @@ -324,27 +325,27 @@ void rarch_main_data_msg_queue_push(unsigned type, break; case DATA_TYPE_FILE: queue = rarch_main_data_nbio_get_msg_queue_ptr(); - snprintf(new_msg, sizeof(new_msg), "%s|%s", msg, msg2); + fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; case DATA_TYPE_IMAGE: queue = rarch_main_data_nbio_image_get_msg_queue_ptr(); - snprintf(new_msg, sizeof(new_msg), "%s|%s", msg, msg2); + fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #ifdef HAVE_NETWORKING case DATA_TYPE_HTTP: queue = rarch_main_data_http_get_msg_queue_ptr(); - snprintf(new_msg, sizeof(new_msg), "%s|%s", msg, msg2); + fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif #ifdef HAVE_OVERLAY case DATA_TYPE_OVERLAY: - snprintf(new_msg, sizeof(new_msg), "%s|%s", msg, msg2); + fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif #ifdef HAVE_LIBRETRODB case DATA_TYPE_DB: queue = rarch_main_data_db_get_msg_queue_ptr(); - snprintf(new_msg, sizeof(new_msg), "%s|%s", msg, msg2); + fill_pathname_join_delim(new_msg, msg, msg2, '|', sizeof(new_msg)); break; #endif }