Fix "assuming signed overflow does not occur" warning.

This commit is contained in:
Kim Woelders 2016-03-16 19:54:34 +01:00
parent 8abdb98965
commit 94a357482b
1 changed files with 5 additions and 4 deletions

View File

@ -109,26 +109,27 @@ __imlib_MergeUpdate(ImlibUpdate * u, int w, int h, int hgapmax)
{
if (T(x, y).used & T_USED)
{
int xx, yy, ww, hh, ok;
int xx, yy, ww, hh, ok, xww;
for (xx = x + 1, ww = 1;
(T(xx, y).used & T_USED) && (xx < tw); xx++, ww++);
xww = x + ww;
for (yy = y + 1, hh = 1, ok = 1;
(yy < th) && (ok); yy++, hh++)
{
for (xx = x; xx < (x + ww); xx++)
for (xx = x; xx < xww; xx++)
{
if (!(T(xx, yy).used & T_USED))
{
ok = 0;
xx = x + ww;
hh--;
break;
}
}
}
for (yy = y; yy < (y + hh); yy++)
{
for (xx = x; xx < (x + ww); xx++)
for (xx = x; xx < xww; xx++)
T(xx, yy).used = T_UNUSED;
}
nu = __imlib_AddUpdate(nu, (x << TB), (y << TB),