diff options
author | peter1138 <peter1138@openttd.org> | 2006-05-12 19:30:49 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2006-05-12 19:30:49 +0000 |
commit | b7c7ec107ee3931201c49f8a2a3f3611e034abd7 (patch) | |
tree | 01287eb79806861700dafeb5d28dbc6326bab9df | |
parent | 14eec984df7dac8e2a24782f88ed1dbcc0c549b1 (diff) | |
download | openttd-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |