summaryrefslogtreecommitdiffstats
path: root/monop/houses.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2008-02-19 09:32:34 +0000
committerdholland <dholland@NetBSD.org>2008-02-19 09:32:34 +0000
commit83ccf38996c164203905a620ecf3c8e14ecb1768 (patch)
tree18bc034193de0cb15ca9b5ffc707f6961cdb54e7 /monop/houses.c
parent7b6be30c35ffc31d7abab3b759819288cda3cf45 (diff)
downloadbsdgames-darwin-83ccf38996c164203905a620ecf3c8e14ecb1768.tar.gz
bsdgames-darwin-83ccf38996c164203905a620ecf3c8e14ecb1768.tar.zst
bsdgames-darwin-83ccf38996c164203905a620ecf3c8e14ecb1768.zip
Don't use sprintf; use snprintf.
Diffstat (limited to 'monop/houses.c')
-rw-r--r--monop/houses.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/monop/houses.c b/monop/houses.c
index 403d0887..631c1034 100644
--- a/monop/houses.c
+++ b/monop/houses.c
@@ -1,4 +1,4 @@
-/* $NetBSD: houses.c,v 1.9 2006/03/19 00:19:31 christos Exp $ */
+/* $NetBSD: houses.c,v 1.10 2008/02/19 09:32:34 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)houses.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: houses.c,v 1.9 2006/03/19 00:19:31 christos Exp $");
+__RCSID("$NetBSD: houses.c,v 1.10 2008/02/19 09:32:34 dholland Exp $");
#endif
#endif /* not lint */
@@ -133,7 +133,7 @@ over:
temp[i] = 5;
continue;
}
- (void)sprintf(cur_prop, "%s (%d): ",
+ (void)snprintf(cur_prop, sizeof(cur_prop), "%s (%d): ",
mp->sq[i]->name, pp->houses);
input[i] = get_int(cur_prop);
temp[i] = input[i] + pp->houses;
@@ -237,10 +237,11 @@ over:
continue;
}
if (pp->houses < 5)
- (void)sprintf(cur_prop,"%s (%d): ",
+ (void)snprintf(cur_prop, sizeof(cur_prop), "%s (%d): ",
mp->sq[i]->name,pp->houses);
else
- (void)sprintf(cur_prop,"%s (H): ",mp->sq[i]->name);
+ (void)snprintf(cur_prop, sizeof(cur_prop), "%s (H): ",
+ mp->sq[i]->name);
input[i] = get_int(cur_prop);
temp[i] = pp->houses - input[i];
if (temp[i] < 0) {