mirror of
git://git.codemadness.org/stagit
synced 2025-03-09 09:09:12 -04:00
fix: check gmtime, can return NULL on error
This commit is contained in:
parent
8df54926f2
commit
28730218c4
@ -49,7 +49,8 @@ printtimeformat(FILE *fp, const git_time *intime, const char *fmt)
|
||||
char out[32];
|
||||
|
||||
t = (time_t) intime->time + (intime->offset * 60);
|
||||
intm = gmtime(&t);
|
||||
if (!(intm = gmtime(&t)))
|
||||
return;
|
||||
strftime(out, sizeof(out), fmt, intm);
|
||||
fputs(out, fp);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user