mirror of https://github.com/0intro/wmii
fixed bug reported by Konstantin Klett via mail
This commit is contained in:
parent
5662a1b15c
commit
d2aba5b621
|
@ -124,7 +124,8 @@ static char *
|
|||
time2str(unsigned int t)
|
||||
{
|
||||
static char buf[32];
|
||||
cext_strlcpy(buf, ctime((time_t *)&t), sizeof(buf));
|
||||
char *tstr = ctime((time_t *)&t);
|
||||
cext_strlcpy(buf, tstr ? tstr : "invalid", sizeof(buf));
|
||||
buf[strlen(buf) - 1] = 0;
|
||||
return buf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue