Mercurial > hg > dmlib
changeset 2067:430c010d97c1
Fix hardcoding in ACBM decoding.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 05 Dec 2018 13:33:45 +0200 |
parents | 63284e9ad95e |
children | e4dc8fbaa5ad |
files | tools/libgfx.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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; } } }