summaryrefslogtreecommitdiff
path: root/games/hack/hack.shk.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-10-26 19:59:36 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-10-26 19:59:36 +0000
commit8deb8394464151d582d21e03bd5ab95ed54350da (patch)
tree4860b1c18c2365cba0a680578eae5f189e404f86 /games/hack/hack.shk.c
parenta91b5f1fea06a915082619d8aef128f8a8561c60 (diff)
prefer $LOGNAME over $USER. fix strncpy() usage.
Diffstat (limited to 'games/hack/hack.shk.c')
-rw-r--r--games/hack/hack.shk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/games/hack/hack.shk.c b/games/hack/hack.shk.c
index 6e216b7adca..a3adc7b8358 100644
--- a/games/hack/hack.shk.c
+++ b/games/hack/hack.shk.c
@@ -203,7 +203,8 @@ register roomno = inroom(u.ux,u.uy);
/* He seems to be new here */
ESHK(shopkeeper)->visitct = 0;
ESHK(shopkeeper)->following = 0;
- (void) strncpy(ESHK(shopkeeper)->customer,plname,PL_NSIZ);
+ (void) strncpy(ESHK(shopkeeper)->customer,plname,PL_NSIZ-1);
+ ESHK(shopkeeper)->customer[PL_NSIZ-1] = '\0';
NOTANGRY(shopkeeper) = 1;
}
if(!ESHK(shopkeeper)->following) {