diff options
author | fox <fox@NetBSD.org> | 2020-02-07 22:04:02 +0000 |
---|---|---|
committer | fox <fox@NetBSD.org> | 2020-02-07 22:04:02 +0000 |
commit | 82ea27e3520822ac62ab58316392af4c742bfcbe (patch) | |
tree | ac0370160b77111c5abafd6d50484482239f7ded /hack | |
parent | 3d85b22e20fa76fb513dbfcec2a4f575e2bc13ef (diff) | |
download | bsdgames-darwin-82ea27e3520822ac62ab58316392af4c742bfcbe.tar.gz bsdgames-darwin-82ea27e3520822ac62ab58316392af4c742bfcbe.tar.zst bsdgames-darwin-82ea27e3520822ac62ab58316392af4c742bfcbe.zip |
games/hack: Revert the strlcpy(1) change since this changes expected behavior from strncpy(3).
Reviewed by: kamil@
Diffstat (limited to 'hack')
-rw-r--r-- | hack/hack.end.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hack/hack.end.c b/hack/hack.end.c index ae0e1e39..3a58c586 100644 --- a/hack/hack.end.c +++ b/hack/hack.end.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $ */ +/* $NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $ */ /* * Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica, @@ -63,7 +63,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.end.c,v 1.18 2020/02/07 20:34:18 fox Exp $"); +__RCSID("$NetBSD: hack.end.c,v 1.19 2020/02/07 22:04:02 fox Exp $"); #endif /* not lint */ #include <signal.h> @@ -362,7 +362,7 @@ topten(void) t0->plchar = pl_character[0]; t0->sex = (flags.female ? 'F' : 'M'); t0->uid = uid; - (void) strlcpy(t0->name, plname, NAMSZ); + (void) strncpy(t0->name, plname, NAMSZ); (t0->name)[NAMSZ] = 0; (void) strncpy(t0->death, killer, DTHSZ); (t0->death)[DTHSZ] = 0; |