diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-26 19:59:36 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-26 19:59:36 +0000 |
commit | 8deb8394464151d582d21e03bd5ab95ed54350da (patch) | |
tree | 4860b1c18c2365cba0a680578eae5f189e404f86 /games/hack/hack.shk.c | |
parent | a91b5f1fea06a915082619d8aef128f8a8561c60 (diff) |
prefer $LOGNAME over $USER. fix strncpy() usage.
Diffstat (limited to 'games/hack/hack.shk.c')
-rw-r--r-- | games/hack/hack.shk.c | 3 |
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) { |