Mercurial > hg > dmlib
changeset 1838:d02514ceed91
Fix Fun Paint 2 packed variant writing, it was missing one byte (the "is packed" flag).
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 22 Jun 2018 18:21:36 +0300 |
parents | cc4570c0bca5 |
children | 666b27999570 |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Fri Jun 22 17:02:47 2018 +0300 +++ b/tools/lib64fmts.c Fri Jun 22 18:21:36 2018 +0300 @@ -753,8 +753,8 @@ { // Add the header bits if (!dmGrowBufPut(buf, (Uint8 *) fmtFunPaint2MagicID, strlen(fmtFunPaint2MagicID)) || - !dmGrowBufPutU8(buf, 0) || - !dmGrowBufPutU8(buf, 0)) + !dmGrowBufPutU8(buf, 0) || // 0 == unpacked variant + !dmGrowBufPutU8(buf, 0)) // RLE marker byte (not used in unpacked) return DMERR_MALLOC; return dmC64EncodeGenericBMP(FALSE, buf, img, fmt); @@ -782,6 +782,7 @@ // Add the header bits if (!dmGrowBufPut(buf, (Uint8 *) fmtFunPaint2MagicID, strlen(fmtFunPaint2MagicID)) || + !dmGrowBufPutU8(buf, 1) || // non-zero == packed variant !dmGrowBufPutU8(buf, cfg.rleMarkerB)) { res = DMERR_MALLOC;