From b7c7ec107ee3931201c49f8a2a3f3611e034abd7 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 12 May 2006 19:30:49 +0000 Subject: [PATCH] (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. --- strings.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/strings.c b/strings.c index 48c0ab3b3a..73dbabdcc4 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] = ' '; - 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); }