adium 2380:eab4430f72a9: If for some reason largestOrder is wron...
commits at adium.im
commits at adium.im
Thu May 28 19:34:43 UTC 2009
details: http://hg.adium.im/adium/rev/eab4430f72a9
revision: 2380:eab4430f72a9
author: Zachary West <zacw at adium.im>
date: Thu May 28 15:34:36 2009 -0400
If for some reason largestOrder is wrong, this could infinite loop. This might hit a lot, but it'll definitely break past the max.
diffs (15 lines):
diff -r f7fd094b23da -r eab4430f72a9 Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m Thu May 28 15:09:49 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIListObject.m Thu May 28 15:34:36 2009 -0400
@@ -671,9 +671,9 @@
while (existingKeys.count && ![existingKeys isEqualToArray:[NSArray arrayWithObject:listObject.internalObjectID]]) {
if (existingKeys.count == 1) {
AILogWithSignature(@"*** Warning: %@ had order index %f, but %@ already had an object with that order index. Setting to %f instead. Incrementing.",
- listObject, orderIndexForObject, self, (self.largestOrder + 1));
+ listObject, orderIndexForObject, self, orderIndexForObject+1);
- orderIndexForObject = self.largestOrder + 1;
+ orderIndexForObject++;
orderIndexForObjectNumber = [NSNumber numberWithFloat:orderIndexForObject];
existingKeys = [dict allKeysForObject:orderIndexForObjectNumber];
More information about the commits
mailing list