adium 2381:c4c53441766b: If a group is empty, don't try and set ...

commits at adium.im commits at adium.im
Thu May 28 20:09:27 UTC 2009


details:	http://hg.adium.im/adium/rev/c4c53441766b
revision:	2381:c4c53441766b
author:		Zachary West <zacw at adium.im>
date:		Thu May 28 16:09:19 2009 -0400

If a group is empty, don't try and set INFINITY as a new object's index.

diffs (12 lines):

diff -r eab4430f72a9 -r c4c53441766b Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m	Thu May 28 15:34:36 2009 -0400
+++ b/Frameworks/Adium Framework/Source/AIListObject.m	Thu May 28 16:09:19 2009 -0400
@@ -750,7 +750,7 @@
 		largest = MAX(largest, index.floatValue);
 	}
 	
-	cachedSmallestOrder = smallest;
+	cachedSmallestOrder = (smallest == INFINITY ? 1 : smallest);
 	cachedLargestOrder = largest;
 }
 




More information about the commits mailing list