summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-12 19:30:49 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-12 19:30:49 +0000
commitb7c7ec107ee3931201c49f8a2a3f3611e034abd7 (patch)
tree01287eb79806861700dafeb5d28dbc6326bab9df
parent14eec984df7dac8e2a24782f88ed1dbcc0c549b1 (diff)
downloadopenttd-b7c7ec107ee3931201c49f8a2a3f3611e034abd7.tar.xz
(svn r4854) - Codechange: don't assume a short format month is 3 characters -- copy the string in the same way the other parts
are copied.
-rw-r--r--strings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/strings.c b/strings.c
index 48c0ab3b3..73dbabdcc 100644
--- a/strings.c
+++ b/strings.c
@@ -324,10 +324,10 @@ static char *FormatYmdString(char *buff, uint16 number)
ConvertDayToYMD(&ymd, number);
for (src = GetStringPtr(ymd.day + STR_01AC_1ST - 1); (*buff++ = *src++) != '\0';) {}
+ buff[-1] = ' ';
+ for (src = GetStringPtr(STR_0162_JAN + ymd.month); (*buff++ = *src++) != '\0';) {}
buff[-1] = ' ';
- memcpy(buff, GetStringPtr(STR_0162_JAN + ymd.month), 4);
- buff[3] = ' ';
return FormatNoCommaNumber(buff + 4, ymd.year + MAX_YEAR_BEGIN_REAL);
}