summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--larn/scores.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/larn/scores.c b/larn/scores.c
index b33150c5..c17a770f 100644
--- a/larn/scores.c
+++ b/larn/scores.c
@@ -1,4 +1,4 @@
-/* $NetBSD: scores.c,v 1.19 2010/04/02 21:40:00 christos Exp $ */
+/* $NetBSD: scores.c,v 1.20 2010/04/24 00:56:14 dholland Exp $ */
/*
* scores.c Larn is copyrighted 1986 by Noah Morgan.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: scores.c,v 1.19 2010/04/02 21:40:00 christos Exp $");
+__RCSID("$NetBSD: scores.c,v 1.20 2010/04/24 00:56:14 dholland Exp $");
#endif /* not lint */
#include <sys/types.h>
#include <sys/times.h>
@@ -64,7 +64,7 @@ struct wscofmt { /* This is the structure for the winning
struct log_fmt { /* 102 bytes struct for the log file */
long score; /* the players score */
- time_t diedtime; /* time when game was over */
+ int32_t diedtime; /* time when game was over */
short cavelev;/* level in caves */
short diff; /* difficulty player played at */
#ifdef EXTRA
@@ -774,6 +774,8 @@ diedlog()
char *p;
static char q[] = "?";
struct stat stbuf;
+ time_t t;
+
lcreat((char *) 0);
if (lopen(logfile) < 0) {
lprintf("Can't locate log file <%s>\n", logfile);
@@ -785,7 +787,8 @@ diedlog()
}
for (n = stbuf.st_size / sizeof(struct log_fmt); n > 0; --n) {
lrfill((char *) &logg, sizeof(struct log_fmt));
- if ((p = ctime(&logg.diedtime)) == NULL)
+ t = logg.diedtime;
+ if ((p = ctime(&t)) == NULL)
p = q;
else {
p[16] = '\n';