ref: 550fe5d2fb8ca91993cb4f015f23946774b86ffc
parent: c9b91beed10228a1916e47a2189650c607da27e3
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Sun Oct 21 16:20:16 EDT 2018
Fix palette values when we reach max plane values Fixes #82.
--- a/src/decode.c
+++ b/src/decode.c
@@ -426,7 +426,7 @@
prev = pal[i++] = imin(prev + delta + !pl, max);
if (prev + !pl >= max) {
for (; i < pal_sz; i++)
- pal[i] = pal[i - 1];
+ pal[i] = pal[i - 1] + !pl;
break;
}
bits = imin(bits, 1 + ulog2(max - prev - !pl));