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

@ -922,18 +922,20 @@ efreet_icon_populate(Efreet_Icon *icon, const char *file)
s = t;
for (i = 0; i < 4; i++)
{
p = strchr(s, ',');
if (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;
continue;
}
*p = '\0';
points[i] = atoi(p);
s = ++p;
}
icon->has_embedded_text_rectangle = 1;