From e885e07c3e5eab6640d29e68d087475f9b5d59b8 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sun, 3 Dec 2000 07:43:52 +0000 Subject: [PATCH] Tidied git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8248 72102866-910b-0410-8b05-ffd578937521 --- Source/NSCalendarDate.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/NSCalendarDate.m b/Source/NSCalendarDate.m index a19bfa7ea..546afab4f 100644 --- a/Source/NSCalendarDate.m +++ b/Source/NSCalendarDate.m @@ -307,6 +307,7 @@ static inline int getDigits(const char *from, char *to, int limit) NSString *tForm; NSString *TForm; NSMutableData *fd; + BOOL changedFormat = NO; if (locale == nil) { @@ -412,6 +413,7 @@ static inline int getDigits(const char *from, char *to, int limit) } [sub getCharacters: &format[pos-1]]; formatLen += sLen - 2; + changedFormat = YES; pos -= 2; // Re-parse the newly substituted data. } } @@ -422,7 +424,7 @@ static inline int getDigits(const char *from, char *to, int limit) /* * Set up calendar format. */ - if (formatLen > [fmt length]) + if (changedFormat == YES) { fmt = [NSString stringWithCharacters: format length: formatLen]; }