forked from old/legacy-imlib2
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:
parent
7eba2e4c8a
commit
ecfe46cc4a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue