loader_xpm: remove nonsense/impossible/broken condition

1) ptr is DATA32 *, so (ptr-im->data) is (w * h) at most;
so this condition was broken, it should've been ((ptr-im->data) >= w*h);
2) ... however, ptr != NULL and (context > 1) are only possible together,
and ptr and count are incremented always together too, so
there are no point to check both; leave only less expensive check.
This commit is contained in:
Yuriy M. Kaminskiy 2016-04-06 06:17:38 +03:00 committed by Kim Woelders
parent 7eba2e4c8a
commit ecfe46cc4a
1 changed files with 1 additions and 2 deletions

View File

@ -510,8 +510,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
line = realloc(line, lsz);
}
if (((ptr) && ((ptr - im->data) >= (w * h * (int)sizeof(DATA32)))) ||
((context > 1) && (count >= pixels)))
if ((context > 1) && (count >= pixels))
done = 1;
}