# HG changeset patch # User mru # Date 1273422260 0 # Node ID 5eb6d3cbf25719fe6465ed8c7f2c890a8ac69a20 # Parent 24827da9c8dcd42e8f9ccfeef7c8d919996328ac IFF: decode last 8 pixels per line The decodeplane8() function processes one byte of input less than it should. Also, the for loop has an unusual style with side-effects in the controlling expression; replaced with a more intuitive while loop. 10l to Basty. diff -r 24827da9c8dc -r 5eb6d3cbf257 iff.c --- a/iff.c Sat May 08 21:48:44 2010 +0000 +++ b/iff.c Sun May 09 16:24:20 2010 +0000 @@ -141,9 +141,10 @@ static void decodeplane8(uint8_t *dst, const uint8_t *buf, int buf_size, int bps, int plane) { const uint64_t *lut = plane8_lut[plane]; - for(; --buf_size != 0; dst += 8) { + while (buf_size--) { uint64_t v = AV_RN64A(dst) | lut[*buf++]; AV_WN64A(dst, v); + dst += 8; } }