summaryrefslogtreecommitdiff
path: root/games/hack/hack.end.c
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-07-06 02:07:46 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-07-06 02:07:46 +0000
commit428205dfb2d9eb6cc21ad67ca83998115e665458 (patch)
tree68cccf0308046dc6bca823670194fdb2d8c98a8d /games/hack/hack.end.c
parent9e3628d296cdd659839a7b772c967f101c2d6efd (diff)
convert a bunch of strn{cpy,cat}->strl{cpy,cat}
pjanzen@ ok
Diffstat (limited to 'games/hack/hack.end.c')
-rw-r--r--games/hack/hack.end.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/games/hack/hack.end.c b/games/hack/hack.end.c
index 36e3feec3eb..542b9d5084f 100644
--- a/games/hack/hack.end.c
+++ b/games/hack/hack.end.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.end.c,v 1.8 2003/05/19 06:30:56 pjanzen Exp $ */
+/* $OpenBSD: hack.end.c,v 1.9 2003/07/06 02:07:45 avsm Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -62,7 +62,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: hack.end.c,v 1.8 2003/05/19 06:30:56 pjanzen Exp $";
+static const char rcsid[] = "$OpenBSD: hack.end.c,v 1.9 2003/07/06 02:07:45 avsm Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -340,10 +340,8 @@ topten()
t0->plchar = pl_character[0];
t0->sex = (flags.female ? 'F' : 'M');
t0->uid = uid;
- (void) strncpy(t0->name, plname, NAMSZ);
- (t0->name)[NAMSZ] = 0;
- (void) strncpy(t0->death, killer, DTHSZ);
- (t0->death)[DTHSZ] = 0;
+ (void) strlcpy(t0->name, plname, sizeof t0->name);
+ (void) strlcpy(t0->death, killer, sizeof t0->death);
(void) strlcpy(t0->date, getdate(), sizeof t0->date);
/* assure minimum number of points */