Fix keyed decoding for GSMutableArray and GSPlaceholderArray.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33026 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-05-12 08:24:15 +00:00
parent effa0292d8
commit ac3f2c5095
2 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,7 @@
2011-05-12 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSArray.m: Fix keyed decoding for GSMutableArray and GSPlaceholderArray.
2011-05-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSXMLParser.m: treat unknown/undefined encodings as utf-8

View file

@ -535,10 +535,7 @@ static Class GSInlineArrayClass;
{
if ([aCoder allowsKeyedCoding])
{
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
@"NS.objects"];
[self initWithArray: array];
self = [super initWithCoder: aCoder];
}
else
{
@ -1123,9 +1120,15 @@ static Class GSInlineArrayClass;
if ([aCoder allowsKeyedCoding])
{
NSArray *array = [(NSKeyedUnarchiver*)aCoder _decodeArrayOfObjectsForKey:
@"NS.objects"];
return RETAIN(array);
@"NS.objects"];
if (array != nil)
{
return RETAIN(array);
}
else
{
return [super initWithCoder: aCoder];
}
}
else
{