Use actual uint64 values to compare uint64 variants
authorChristian Dywan <christian@twotoasts.de>
Wed, 17 Aug 2011 23:38:34 +0000 (01:38 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 17 Aug 2011 23:38:34 +0000 (01:38 +0200)
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=656772
glib/gvariant.c

index 22faf0851f6107af61db9b9f148c38cb9c8de8b2..fb87f4309858cbbdf4246e6c8e62c0abf021dfec 100644 (file)
@@ -2618,8 +2618,8 @@ g_variant_compare (gconstpointer one,
 
     case G_VARIANT_CLASS_UINT64:
       {
-        guint64 a_val = g_variant_get_int32 (a);
-        guint64 b_val = g_variant_get_int32 (b);
+        guint64 a_val = g_variant_get_uint64 (a);
+        guint64 b_val = g_variant_get_uint64 (b);
 
         return (a_val == b_val) ? 0 : (a_val > b_val) ? 1 : -1;
       }