Evas filters: Use common color parse function

This commit is contained in:
Jean-Philippe Andre 2013-12-30 19:28:55 +09:00
parent 0ad8b02c16
commit 7fbbf9eabe
1 changed files with 4 additions and 4 deletions

View File

@ -436,16 +436,16 @@ _color_parse(const char *word, DATA32 *color)
{
unsigned long value;
Eina_Bool success = EINA_FALSE;
char *end;
PARSE_CHECK(word && *word);
errno = 0;
if (*word == '#')
{
word++;
value = strtoul(word, &end, 16);
PARSE_CHECK((errno == 0) && (word != end));
unsigned char a, r, g, b;
int slen = strlen(word);
PARSE_CHECK(evas_common_format_color_parse(word, slen, &r, &g, &b, &a));
value = ARGB_JOIN(a, r, g, b);
}
else
{