Mercurial > hg > dmlib
diff tools/lib64fmts.c @ 1749:feaf5cf07603
Apparently Fun Paint 2 also saves one byte less than it should with the
packed format .. so we need to extend our buffer.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 11 Jun 2018 14:23:52 +0300 |
parents | 9c4b3fecc510 |
children | 768fddda73e9 |
line wrap: on
line diff
--- a/tools/lib64fmts.c Mon Jun 11 14:21:09 2018 +0300 +++ b/tools/lib64fmts.c Mon Jun 11 14:23:52 2018 +0300 @@ -573,11 +573,15 @@ cfg.flags = DM_RLE_BYTE_RUNS | DM_RLE_ORDER_1; cfg.rleMarkerB = buf->data[15]; + dmGrowBufCopyOffs(&tmp, buf, FUNPAINT2_HEADER_SIZE, 1); + tmp.len = tmp.size; + if ((res = dmDecodeGenericRLEAlloc( - &mem, dmGrowBufCreateFromOffs(&tmp, buf, FUNPAINT2_HEADER_SIZE), &cfg)) == DMERR_OK) + &mem, &tmp, &cfg)) == DMERR_OK) res = dmC64DecodeGenericBMP(img, &mem, fmt); dmGrowBufFree(&mem); + dmGrowBufFree(&tmp); } else {