summaryrefslogtreecommitdiff
path: root/games/hack/hack.dog.c
diff options
context:
space:
mode:
authorThierry Deval <tdeval@cvs.openbsd.org>2003-05-07 09:48:58 +0000
committerThierry Deval <tdeval@cvs.openbsd.org>2003-05-07 09:48:58 +0000
commitc4fc169dda87c72986c6289cda73af58d9525ad0 (patch)
treec1f83121a66300e511baa11937369bd3650633b8 /games/hack/hack.dog.c
parentcec4fba2d68884e9da4662a55153a523a76eb5f2 (diff)
Major strings rework. Ok pjanzen@
Diffstat (limited to 'games/hack/hack.dog.c')
-rw-r--r--games/hack/hack.dog.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/games/hack/hack.dog.c b/games/hack/hack.dog.c
index c5ae1c82803..95be6b7a204 100644
--- a/games/hack/hack.dog.c
+++ b/games/hack/hack.dog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.dog.c,v 1.5 2003/03/16 21:22:35 camield Exp $ */
+/* $OpenBSD: hack.dog.c,v 1.6 2003/05/07 09:48:57 tdeval Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -62,7 +62,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: hack.dog.c,v 1.5 2003/03/16 21:22:35 camield Exp $";
+static char rcsid[] = "$OpenBSD: hack.dog.c,v 1.6 2003/05/07 09:48:57 tdeval Exp $";
#endif /* not lint */
#include "hack.h"
@@ -470,7 +470,8 @@ register struct obj *obj;
mtmp2 = newmonst(sizeof(struct edog) + mtmp->mnamelth);
*mtmp2 = *mtmp;
mtmp2->mxlth = sizeof(struct edog);
- if(mtmp->mnamelth) (void) strcpy(NAME(mtmp2), NAME(mtmp));
+ if(mtmp->mnamelth)
+ (void) strlcpy(NAME(mtmp2), NAME(mtmp), mtmp2->mnamelth);
initedog(mtmp2);
replmon(mtmp,mtmp2);
return(1);