summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2010-01-10 15:54:35 +0100
committerBardur Arantsson <bardur@scientician.net>2010-01-10 19:32:02 +0100
commit3d46b09fe21dfdea43b0e4e224363ecb67a0fb9b (patch)
treef0ca4de091927fe4ddf2b19a105a4afabcd45c63 /src/util.c
parentc2d791994cc8b30d9e6aa2c71a94998dfacc07d4 (diff)
Clean up sprintf() usage to always use a "%s" format string.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index d3152d8f..b199a2a2 100644
--- a/src/util.c
+++ b/src/util.c
@@ -4468,7 +4468,7 @@ cptr get_month_name(int day, bool full, bool compact)
{
char buf2[20];
- sprintf(buf2, get_day(day + 1));
+ sprintf(buf2, "%s", get_day(day + 1));
if (full) sprintf(buf, "%s (%s day)", month_name[i], buf2);
else sprintf(buf, "%s", month_name[i]);
break;
@@ -4479,8 +4479,8 @@ cptr get_month_name(int day, bool full, bool compact)
char buf2[20];
char buf3[20];
- sprintf(buf2, get_day(day + 1 - month_day[i]));
- sprintf(buf3, get_day(day + 1));
+ sprintf(buf2, "%s", get_day(day + 1 - month_day[i]));
+ sprintf(buf3, "%s", get_day(day + 1));
if (full) sprintf(buf, "%s day of %s (%s day)", buf2, month_name[i], buf3);
else if (compact) sprintf(buf, "%s day of %s", buf2, month_name[i]);