Mercurial > hg > openttd
changeset 3832:0517eb23939a draft
(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.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Fri, 12 May 2006 19:30:49 +0000 |
parents | 703f3a6dc8c9 |
children | c838fdfb8f60 |
files | strings.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/strings.c +++ b/strings.c @@ -324,10 +324,10 @@ ConvertDayToYMD(&ymd, number); for (src = GetStringPtr(ymd.day + STR_01AC_1ST - 1); (*buff++ = *src++) != '\0';) {} - buff[-1] = ' '; - memcpy(buff, GetStringPtr(STR_0162_JAN + ymd.month), 4); - buff[3] = ' '; + + for (src = GetStringPtr(STR_0162_JAN + ymd.month); (*buff++ = *src++) != '\0';) {} + buff[-1] = ' '; return FormatNoCommaNumber(buff + 4, ymd.year + MAX_YEAR_BEGIN_REAL); }