Current CVS has a minor bug where ARGB strings that use the 32nd bit are
lost. For example

"#ffffffff" will parse into a = 0x7F, r,g,b = 0xFF.

Attached is a simple fix that replaces the strtol with a strtoll, fixing
the glitch.


Dylan.
Index: ecore_config.c
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_config/ecore_config.c,v
retrieving revision 1.59
diff -u -p -r1.59 ecore_config.c
--- ecore_config.c      2 Mar 2005 07:06:34 -0000       1.59
+++ ecore_config.c      23 Apr 2005 09:04:27 -0000
@@ -470,6 +470,7 @@ ecore_config_typed_val(Ecore_Config_Prop
 {
    char               *l;
    long                v;
+   long long          lv;
    int                *i;
    float              *f;
 
@@ -503,7 +504,7 @@ ecore_config_typed_val(Ecore_Config_Prop
          {
             if (((char *)val)[0] == '#')
               {
-                 if ((v = strtol(&((char *)val)[1], &l, 16)) < 0)
+                 if (((lv = strtoll(&((char *)val)[1], &l, 16))>> 32) != 0)
                    {
                       v = 0;
                       E(0,
@@ -525,7 +526,7 @@ ecore_config_typed_val(Ecore_Config_Prop
                  e->key, (char *)val);
             else
               {
-                 e->val = v;
+                 e->val = (long)lv;
                  e->type = PT_RGB;
               }
          }

Reply via email to