parse number values write in a hex string in obxprop
authorDana Jansens <danakj@orodu.net>
Wed, 12 May 2010 03:31:03 +0000 (23:31 -0400)
committerDana Jansens <danakj@orodu.net>
Wed, 12 May 2010 03:31:03 +0000 (23:31 -0400)
tools/obxprop/obxprop.c

index 071ae3f..e4f6ff0 100644 (file)
@@ -28,9 +28,9 @@ gint parse_hex(gchar *s) {
         if (*s >= '0' && *s <='9')
             add = *s-'0';
         else if (*s >= 'A' && *s <='F')
-            add = *s-'A';
+            add = *s-'A'+10;
         else if (*s >= 'a' && *s <='f')
-            add = *s-'a';
+            add = *s-'a'+10;
         else
             break;