From 47d0a18f953dc2bb5e8f7c21faab796c5a820d36 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 21 Jul 2010 12:08:35 +0100 Subject: [PATCH] Fix Presence.is_online() Due to a signed/unsigned int problem, typecmp() was never returning negative answers, so everyone was always online. --- folks/presence.vala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/folks/presence.vala b/folks/presence.vala index 3de820f..9e2230a 100644 --- a/folks/presence.vala +++ b/folks/presence.vala @@ -108,9 +108,10 @@ public interface Folks.Presence : Object * * @return a number representing the similarity of the two types */ - public static uint typecmp (PresenceType type_a, PresenceType type_b) + public static int typecmp (PresenceType type_a, PresenceType type_b) { - return type_availability (type_a) - type_availability (type_b); + return (int) type_availability (type_a) - + (int) type_availability (type_b); } /** -- 2.7.4