summaryrefslogtreecommitdiff
path: root/games/hack/hack.fight.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-06 18:50:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-06 18:50:39 +0000
commit0f64621783b3f46a4851826b9f4284e3c9dbeb61 (patch)
tree352fcb09d9321309ec519dc3144147a24bd64bda /games/hack/hack.fight.c
parent997f28507be542389b846c45806474af6bbfdedc (diff)
2451 lines of strdup/sprintf/strcpy whacking. mostly ok'd by pjanzen
already, but he may have later changes to make still.
Diffstat (limited to 'games/hack/hack.fight.c')
-rw-r--r--games/hack/hack.fight.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/hack/hack.fight.c b/games/hack/hack.fight.c
index 7f14ae36cc1..757d0b12545 100644
--- a/games/hack/hack.fight.c
+++ b/games/hack/hack.fight.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hack.fight.c,v 1.5 2003/03/16 21:22:35 camield Exp $ */
+/* $OpenBSD: hack.fight.c,v 1.6 2003/04/06 18:50:37 deraadt Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -62,7 +62,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: hack.fight.c,v 1.5 2003/03/16 21:22:35 camield Exp $";
+static char rcsid[] = "$OpenBSD: hack.fight.c,v 1.6 2003/04/06 18:50:37 deraadt Exp $";
#endif /* not lint */
#include "hack.h"
@@ -93,7 +93,7 @@ boolean vis;
char buf[BUFSZ];
if(mdef->mimic) seemimic(mdef);
if(magr->mimic) seemimic(magr);
- (void) sprintf(buf,"%s %s", Monnam(magr),
+ (void) snprintf(buf,sizeof buf,"%s %s", Monnam(magr),
hit ? "hits" : "misses");
pline("%s %s.", buf, monnam(mdef));
} else {