@@ -113,10 +113,12 @@ @try { id obj; [array addItem: &first]; + [first retain]; + while ((obj = va_arg(args, id)) != nil) { [array addItem: &obj]; [obj retain]; } } @catch (id e) { @@ -394,13 +396,17 @@ return hash; } - (OFString*)description { - OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; + OFAutoreleasePool *pool; OFMutableString *ret; + if ([array count] == 0) + return @"()"; + + pool = [[OFAutoreleasePool alloc] init]; ret = [[self componentsJoinedByString: @",\n"] mutableCopy]; @try { [ret prependString: @"(\n"]; [ret replaceOccurrencesOfString: @"\n" @@ -563,11 +569,11 @@ @end @implementation OFArrayEnumerator - initWithArray: (OFArray*)array_ dataArray: (OFDataArray*)dataArray_ - mutationsPointer: (unsigned long*)mutationsPtr_; + mutationsPointer: (unsigned long*)mutationsPtr_ { self = [super init]; array = [array_ retain]; dataArray = [dataArray_ retain];