]> Dogcows Code - chaz/openbox/commitdiff
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 071ae3f45ddbe492ee37adf477f796abb8f8fff8..e4f6ff0eb2012e4b9d64c0be2c3cb5ae984001d7 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;
 
This page took 0.023131 seconds and 4 git commands to generate.