Ecore: Fix warning and seg fault

Fix warning: large integer implicitly truncated to unsigned type.
In ecore_x_window_prop_card32_list_get(): return -1 if malloc fails.

Patch from OpenBSD via Jonathan Armani


SVN revision: 65075
This commit is contained in:
Vincent Torri 2011-11-11 19:12:36 +00:00
parent 739751e6c3
commit 15d079882c
1 changed files with 2 additions and 2 deletions

View File

@ -109,11 +109,11 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
if (!val)
{
free(reply);
return num;
return -1;
}
data = xcb_get_property_value(reply);
for (i = 0; i < num; i++)
val[i] = ((unsigned long *)data)[i];
val[i] = ((unsigned int *)data)[i];
*list = val;
}
}