]> git.sesse.net Git - mlt/commitdiff
mlt_property.c: interpret hex int as unsigned
authorddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 20 Feb 2009 23:33:38 +0000 (23:33 +0000)
committerddennedy <ddennedy@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 20 Feb 2009 23:33:38 +0000 (23:33 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1364 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_property.c

index e09c019c0c38541f16478ade9fca4a68351097d7..453368c14e7b05722c12b43094cec833c1a0fb19 100644 (file)
@@ -264,7 +264,7 @@ static inline int mlt_property_atoi( const char *value )
        if ( value == NULL )
                return 0;
        // Parse a hex color value as #RRGGBB or #AARRGGBB.
-       else if ( value[0] == '#' )
+       if ( value[0] == '#' )
        {
                unsigned int rgb = strtoul( value + 1, NULL, 16 );
                unsigned int alpha = ( strlen( value ) > 7 ) ? ( rgb >> 24 ) : 0xff;
@@ -274,7 +274,7 @@ static inline int mlt_property_atoi( const char *value )
        // interpreted as octal.
        else if ( value[0] == '0' && value[1] == 'x' )
        {
-               return strtol( value + 2, NULL, 16 );
+               return strtoul( value + 2, NULL, 16 );
        }
        else
        {