[glib] Fix small bug in registry backend
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix small bug in registry backend
- Date: Wed, 1 Sep 2010 13:05:56 +0000 (UTC)
commit ed72dcdd4507865780ebc14567bf582721a6bce4
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Sep 1 15:04:41 2010 +0200
Fix small bug in registry backend
'n' and 'q' types had their signed/unsigned meaning inverted.
gio/gregistrysettingsbackend.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c
index 3e3db2e..6c1ce1b 100644
--- a/gio/gregistrysettingsbackend.c
+++ b/gio/gregistrysettingsbackend.c
@@ -280,8 +280,8 @@ g_variant_get_as_dword (GVariant *variant)
{
case 'b': return g_variant_get_boolean (variant);
case 'y': return g_variant_get_byte (variant);
- case 'n': return g_variant_get_uint16 (variant);
- case 'q': return g_variant_get_int16 (variant);
+ case 'n': return g_variant_get_int16 (variant);
+ case 'q': return g_variant_get_uint16 (variant);
case 'i': return g_variant_get_int32 (variant);
case 'u': return g_variant_get_uint32 (variant);
default: g_warn_if_reached ();
@@ -294,8 +294,8 @@ g_variant_get_as_qword (GVariant *variant)
{
switch (g_variant_get_type_string (variant)[0])
{
- case 't': return g_variant_get_uint64 (variant);
case 'x': return g_variant_get_int64 (variant);
+ case 't': return g_variant_get_uint64 (variant);
default: g_warn_if_reached ();
}
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]