diff src/status.c @ 10151:d83e6f2125b1

[gaim-migrate @ 11228] Patch by Andrew Hart to fix some bugs in the priority calculations. Marv says it still doesn't work for him, so we probably have a bug elsewhere, but this patch is correct. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 30 Oct 2004 02:28:50 +0000
parents 9fdbfe832fac
children 0b43f6fef9b5
line wrap: on
line diff
--- a/src/status.c	Fri Oct 29 14:49:43 2004 +0000
+++ b/src/status.c	Sat Oct 30 02:28:50 2004 +0000
@@ -1444,9 +1444,9 @@
 	if ((presence1 == NULL && presence2 == NULL) || (presence1 == presence2))
 		return 0;
 	else if (presence1 == NULL)
-		return -1;
+		return 1;
 	else if (presence2 == NULL)
-		return 1;
+		return -1;
 
 	/* Compute the score of the first set of statuses. */
 	for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next)
@@ -1459,7 +1459,7 @@
 	}
 
 	/* Compute the score of the second set of statuses. */
-	for (l = gaim_presence_get_statuses(presence1); l != NULL; l = l->next)
+	for (l = gaim_presence_get_statuses(presence2); l != NULL; l = l->next)
 	{
 		GaimStatus *status = (GaimStatus *)l->data;
 		GaimStatusType *type = gaim_status_get_type(status);