mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 08:12:33 +03:00
For DXT1, only check if 8 bytes are left
This commit is contained in:
parent
d07aa6fd17
commit
e689acfee0
|
@ -257,9 +257,9 @@ ImagingBcnEncode(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
|
|||
|
||||
UINT8 *dst = buf;
|
||||
|
||||
int will_write = (n == 2 || n == 3 || n == 5) ? 16 : 8;
|
||||
for (;;) {
|
||||
// Loop writes a max of 16 bytes per iteration
|
||||
if (dst + 16 >= bytes + buf) {
|
||||
if (dst + will_write >= bytes + buf) {
|
||||
break;
|
||||
}
|
||||
if (n == 5) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user