summaryrefslogtreecommitdiffstats
path: root/hack/hack.invent.c
diff options
context:
space:
mode:
Diffstat (limited to 'hack/hack.invent.c')
-rw-r--r--hack/hack.invent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hack/hack.invent.c b/hack/hack.invent.c
index 6bb41c0f..8b1e7cc8 100644
--- a/hack/hack.invent.c
+++ b/hack/hack.invent.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.invent.c,v 1.11 2009/06/07 18:30:39 dholland Exp $ */
+/* $NetBSD: hack.invent.c,v 1.12 2009/06/07 20:13:18 dholland Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.invent.c,v 1.11 2009/06/07 18:30:39 dholland Exp $");
+__RCSID("$NetBSD: hack.invent.c,v 1.12 2009/06/07 20:13:18 dholland Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -703,7 +703,7 @@ xprname(struct obj *obj, char let)
{
static char li[BUFSZ];
- (void) sprintf(li, "%c - %s.",
+ (void) snprintf(li, sizeof(li), "%c - %s.",
flags.invlet_constant ? obj->invlet : let,
doname(obj));
return (li);
@@ -866,7 +866,7 @@ dolook(void)
if (gold) {
char gbuf[30];
- (void) sprintf(gbuf, "%ld gold piece%s",
+ (void) snprintf(gbuf, sizeof(gbuf), "%ld gold piece%s",
gold->amount, plur(gold->amount));
if (!ct++)
pline("You %s here %s.", verb, gbuf);