diff --git a/command_event.c b/command_event.c index 108b2c1969..fbc6cab9e7 100644 --- a/command_event.c +++ b/command_event.c @@ -268,7 +268,8 @@ void event_disk_control_append_image(const char *path) info.path = path; control->replace_image_index(new_idx, &info); - snprintf(msg, sizeof(msg), "Appended disk: %s", path); + strlcpy(msg, "Appended disk: ", sizeof(msg)); + strlcat(msg, path, sizeof(msg)); RARCH_LOG("%s\n", msg); rarch_main_msg_queue_push(msg, 0, 180, true); diff --git a/retroarch.c b/retroarch.c index 2fbcfd76cd..9bd1da89d4 100644 --- a/retroarch.c +++ b/retroarch.c @@ -1063,14 +1063,13 @@ static void init_system_info(void) if (!info->library_version) info->library_version = "v0"; -#ifdef RARCH_CONSOLE - snprintf(global->title_buf, sizeof(global->title_buf), "%s %s", - info->library_name, info->library_version); -#else +#ifndef RARCH_CONSOLE snprintf(global->title_buf, sizeof(global->title_buf), - RETRO_FRONTEND " : %s %s", - info->library_name, info->library_version); + RETRO_FRONTEND " : "); #endif + strlcat(global->title_buf, info->library_name, sizeof(global->title_buf)); + strlcat(global->title_buf, " ", sizeof(global->title_buf)); + strlcat(global->title_buf, info->library_version, sizeof(global->title_buf)); strlcpy(global->system.valid_extensions, info->valid_extensions ? info->valid_extensions : DEFAULT_EXT, sizeof(global->system.valid_extensions)); diff --git a/runloop.c b/runloop.c index 322218cde1..eba4905080 100644 --- a/runloop.c +++ b/runloop.c @@ -19,6 +19,7 @@ #include #include +#include #include #include "configuration.h" @@ -261,15 +262,11 @@ static bool check_movie_init(void) settings->rewind_granularity = 1; if (settings->state_slot > 0) - { - snprintf(path, sizeof(path), "%s%d.bsv", + snprintf(path, sizeof(path), "%s%d", global->bsv.movie_path, settings->state_slot); - } else - { - snprintf(path, sizeof(path), "%s.bsv", - global->bsv.movie_path); - } + strlcpy(path, global->bsv.movie_path, sizeof(path)); + strlcat(path, ".bsv", sizeof(path)); snprintf(msg, sizeof(msg), "Starting movie record to \"%s\".", path);