Fix EmbeddedTextRectangle parsing.

SVN revision: 30153
This commit is contained in:
Sebastian Dransfeld 2007-05-29 20:24:27 +00:00
parent ab766b0398
commit a4c53227fb
1 changed files with 10 additions and 8 deletions

View File

@ -921,19 +921,21 @@ efreet_icon_populate(Efreet_Icon *icon, const char *file)
t = strdup(tmp); t = strdup(tmp);
s = t; s = t;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{
if (s)
{ {
p = strchr(s, ','); p = strchr(s, ',');
if (!p) if (p) *p = '\0';
points[i] = atoi(s);
if (p) s = ++p;
else s = NULL;
}
else
{ {
points[i] = 0; points[i] = 0;
continue;
} }
*p = '\0';
points[i] = atoi(p);
s = ++p;
} }
icon->has_embedded_text_rectangle = 1; icon->has_embedded_text_rectangle = 1;