diff --git a/runtime_file.c b/runtime_file.c index f2832c0edb4..20646a7d1fc 100644 --- a/runtime_file.c +++ b/runtime_file.c @@ -781,7 +781,7 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log, strftime_am_pm(tmp, sizeof(tmp), format_str, &time_info); str[ _len] = ' '; str[++_len] = '\0'; - strlcat(str, tmp, len); + strlcpy(str + _len, tmp, len - _len); return; } @@ -1040,7 +1040,7 @@ void runtime_log_get_last_played_str(runtime_log_t *runtime_log, sizeof(tmp)); str[ _len] = ' '; str[++_len] = '\0'; - strlcat(str, tmp, len); + strlcpy(str + _len, tmp, len - _len); return; case PLAYLIST_LAST_PLAYED_STYLE_YMD_HMS: default: diff --git a/verbosity.c b/verbosity.c index 69fdae26665..8171be343f8 100644 --- a/verbosity.c +++ b/verbosity.c @@ -462,9 +462,7 @@ void rarch_log_file_init( time_t cur_time = time(NULL); rtime_localtime(&cur_time, &tm_); - strftime(timestamped_log_file_name, sizeof(timestamped_log_file_name), "retroarch__%Y_%m_%d__%H_%M_%S", &tm_); - strlcat(timestamped_log_file_name, ".log", - sizeof(timestamped_log_file_name)); + strftime(timestamped_log_file_name, sizeof(timestamped_log_file_name), "retroarch__%Y_%m_%d__%H_%M_%S.log", &tm_); } /* If nothing has changed, do nothing */