Further refinement of function

This commit is contained in:
libretroadmin 2022-07-11 19:14:48 +02:00
parent 6475d0ca54
commit 4bcc479041
2 changed files with 6 additions and 8 deletions

View File

@ -650,12 +650,11 @@ static void strftime_am_pm(char *s, size_t len, const char* format,
strftime(s, len, format, timeptr);
#if !(defined(__linux__) && !defined(ANDROID))
local = local_to_utf8_string_alloc(s);
if (!string_is_empty(local))
strlcpy(s, local, len);
if (local)
{
if (!string_is_empty(local))
strlcpy(s, local, len);
free(local);
local = NULL;
}

View File

@ -637,12 +637,11 @@ static void last_played_strftime(char *s, size_t len, const char *format,
strftime(s, len, format, timeptr);
#if !(defined(__linux__) && !defined(ANDROID))
local = local_to_utf8_string_alloc(s);
if (!string_is_empty(local))
strlcpy(s, local, len);
if (local)
{
if (!string_is_empty(local))
strlcpy(s, local, len);
free(local);
local = NULL;
}