Add fix suggested by David Ayers to use locale consistently for initialisation

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@24335 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2007-01-10 13:37:08 +00:00
parent 4b30b45ccc
commit 9bd467dac9
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-01-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSDecimalNumber.m: ([initWithBytes:objCType:]) Use the
default locale to produce string.
2007-01-04 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m: backport fix for crash when initialising with

View file

@ -239,7 +239,8 @@ static NSDecimalNumber *one;
NSString *s;
memcpy(&tmp, value, sizeof(tmp));
s = [[NSString alloc] initWithFormat: @"%g", tmp];
s = [[NSString alloc] initWithFormat: @"%g"
locale: GSUserDefaultsDictionaryRepresentation(), tmp];
self = [self initWithString: s];
RELEASE(s);
return self;