(svn r4854) - Codechange: don't assume a short format month is 3 characters -- copy the string in the same way the other parts
authorpeter1138
Fri, 12 May 2006 19:30:49 +0000
changeset 3832 dfc3bcc5c679
parent 3831 da38fed6a0fa
child 3833 49a51ef0c7a7
(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
--- a/strings.c	Fri May 12 17:26:49 2006 +0000
+++ b/strings.c	Fri May 12 19:30:49 2006 +0000
@@ -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);
 }