mirror of
https://github.com/weechat/weechat.git
synced 2026-06-18 17:14:47 +02:00
core, plugins: check return code of strftime function
This commit is contained in:
@@ -4510,7 +4510,10 @@ API_FUNC(infolist_time)
|
||||
variable);
|
||||
date_tmp = localtime (&time);
|
||||
if (date_tmp)
|
||||
strftime (timebuffer, sizeof (timebuffer), "%F %T", date_tmp);
|
||||
{
|
||||
if (strftime (timebuffer, sizeof (timebuffer), "%F %T", date_tmp) == 0)
|
||||
timebuffer[0] = '\0';
|
||||
}
|
||||
result = strdup (timebuffer);
|
||||
|
||||
API_RETURN_STRING_FREE(result);
|
||||
|
||||
Reference in New Issue
Block a user