1
0
mirror of https://github.com/golang/go synced 2024-11-25 12:17:56 -07:00

gopack: convert long to time_t before taking a pointer.

Fixes #40.

R=rsc, r1
CC=golang-dev
https://golang.org/cl/154057
This commit is contained in:
Adam Langley 2009-11-11 11:19:33 -08:00
parent 7f4860640b
commit 5281869fac

View File

@ -1215,11 +1215,13 @@ void
longt(Armember *bp)
{
char *cp;
time_t date;
pmode(strtoul(bp->hdr.mode, 0, 8));
Bprint(&bout, "%3ld/%1ld", strtol(bp->hdr.uid, 0, 0), strtol(bp->hdr.gid, 0, 0));
Bprint(&bout, "%7ld", bp->size);
cp = ctime(&bp->date);
date = bp->date;
cp = ctime(&date);
Bprint(&bout, " %-12.12s %-4.4s ", cp+4, cp+24);
}