Revision: 28799
          http://sourceforge.net/p/bibdesk/svn/28799
Author:   hofman
Date:     2024-02-22 15:00:37 +0000 (Thu, 22 Feb 2024)
Log Message:
-----------
usedwrong arrays

Modified Paths:
--------------
    trunk/bibdesk/BDSKFieldCollection.m

Modified: trunk/bibdesk/BDSKFieldCollection.m
===================================================================
--- trunk/bibdesk/BDSKFieldCollection.m 2024-02-22 14:59:40 UTC (rev 28798)
+++ trunk/bibdesk/BDSKFieldCollection.m 2024-02-22 15:00:37 UTC (rev 28799)
@@ -117,8 +117,8 @@
     self = [super init];
     if (self) {
         fieldCollection = collection;
-        fieldNames = nil;
-        fields = [[NSMutableArray alloc] initWithCapacity:[array count]];
+        fieldNames = [[NSMutableArray alloc] initWithCapacity:[array count]];
+        fields = nil;
         for (NSString *name in array)
             if ([fieldCollection isUsedField:name] == NO)
                 [fieldNames addObject:name];
@@ -136,7 +136,7 @@
 
 - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state 
objects:(id __unsafe_unretained *)stackbuf count:(NSUInteger)len {
     if (state->state == 0) {
-        fieldNames = [[NSMutableArray alloc] initWithCapacity:[fieldNames 
count]];
+        fields = [[NSMutableArray alloc] initWithCapacity:[fieldNames count]];
         for (NSString *name in fieldNames)
             [fields addObject:[fieldCollection fieldForName:name]];
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to