summaryrefslogtreecommitdiffstats
path: root/phantasia/misc.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-05-25 23:14:33 +0000
committerdholland <dholland@NetBSD.org>2009-05-25 23:14:33 +0000
commitb699392ee5e6c55d892a0ab1a639208a373d9bab (patch)
tree4edbb8ac6ae03948294742a29c376a8854df46cd /phantasia/misc.c
parent28a2fb534d0a6db57738352113f148c57f1078f1 (diff)
downloadbsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.tar.gz
bsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.tar.zst
bsdgames-darwin-b699392ee5e6c55d892a0ab1a639208a373d9bab.zip
sprintf -> snprintf
Diffstat (limited to 'phantasia/misc.c')
-rw-r--r--phantasia/misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/phantasia/misc.c b/phantasia/misc.c
index c8f9c1e2..881f4cc4 100644
--- a/phantasia/misc.c
+++ b/phantasia/misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.16 2009/05/25 23:08:45 dholland Exp $ */
+/* $NetBSD: misc.c,v 1.17 2009/05/25 23:14:33 dholland Exp $ */
/*
* misc.c Phantasia miscellaneous support routines
@@ -133,9 +133,11 @@ descrlocation(struct player *playerp, phbool shortflag)
}
if (shortflag)
- sprintf(Databuf, "%.29s", label);
+ snprintf(Databuf, SZ_DATABUF, "%.29s", label);
else
- sprintf(Databuf, " is in %s (%.0f,%.0f)", label, playerp->p_x, playerp->p_y);
+ snprintf(Databuf, SZ_DATABUF,
+ " is in %s (%.0f,%.0f)",
+ label, playerp->p_x, playerp->p_y);
return (Databuf);
}