Save xlogfile time_t fields correctly
This commit is contained in:
@@ -551,13 +551,18 @@ unsigned int *stuckid, *steedid;
|
||||
amii_setpens(amii_numcolors); /* use colors from save file */
|
||||
#endif
|
||||
mread(fd, (genericptr_t) &u, sizeof(struct you));
|
||||
mread(fd, (genericptr_t) timebuf, 14);
|
||||
timebuf[14] = '\0';
|
||||
ubirthday = time_from_yyyymmddhhmmss(timebuf);
|
||||
|
||||
#define ReadTimebuf(foo) mread(fd, (genericptr_t) timebuf, 14); \
|
||||
timebuf[14] = '\0'; \
|
||||
foo = time_from_yyyymmddhhmmss(timebuf);
|
||||
|
||||
ReadTimebuf(ubirthday);
|
||||
ReadTimebuf(urealtime.realtime);
|
||||
ReadTimebuf(urealtime.restored);
|
||||
#if defined(BSD) && !defined(POSIX_TYPES)
|
||||
(void) time((long *)&u.urealtime.restored);
|
||||
(void) time((long *)&urealtime.restored);
|
||||
#else
|
||||
(void) time(&u.urealtime.restored);
|
||||
(void) time(&urealtime.restored);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user