# HG changeset patch # User Matti Hamalainen # Date 1544009625 -7200 # Node ID 430c010d97c16f4f704697eb26fe806f233c4d23 # Parent 63284e9ad95e870212580043ea4a77d8983b47f3 Fix hardcoding in ACBM decoding. diff -r 63284e9ad95e -r 430c010d97c1 tools/libgfx.c --- a/tools/libgfx.c Wed Dec 05 13:33:15 2018 +0200 +++ b/tools/libgfx.c Wed Dec 05 13:33:45 2018 +0200 @@ -1697,11 +1697,10 @@ for (int yc = 0; yc < img->height; yc++) { Uint8 *dp = img->data + (yc * img->pitch); + Uint8 *sp = buf + (yc * img->width) / 8; for (int xc = 0; xc < img->width; xc++) { - const Uint8 data = dmDecodeBit(buf + yc * 40, xc); - if (data) - dp[xc] |= 1 << plane; + dp[xc] |= dmDecodeBit(sp, xc) << plane; } } }