git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8248 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-12-03 07:43:52 +00:00
parent c78a6ca413
commit e885e07c3e

View file

@ -307,6 +307,7 @@ static inline int getDigits(const char *from, char *to, int limit)
NSString *tForm; NSString *tForm;
NSString *TForm; NSString *TForm;
NSMutableData *fd; NSMutableData *fd;
BOOL changedFormat = NO;
if (locale == nil) if (locale == nil)
{ {
@ -412,6 +413,7 @@ static inline int getDigits(const char *from, char *to, int limit)
} }
[sub getCharacters: &format[pos-1]]; [sub getCharacters: &format[pos-1]];
formatLen += sLen - 2; formatLen += sLen - 2;
changedFormat = YES;
pos -= 2; // Re-parse the newly substituted data. 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. * Set up calendar format.
*/ */
if (formatLen > [fmt length]) if (changedFormat == YES)
{ {
fmt = [NSString stringWithCharacters: format length: formatLen]; fmt = [NSString stringWithCharacters: format length: formatLen];
} }