# HG changeset patch # User Matti Hamalainen # Date 1529680896 -10800 # Node ID d02514ceed91a3dfa44c24bb415dacd4a0b058f7 # Parent cc4570c0bca51abbf90d0f24937dcf5d83932b62 Fix Fun Paint 2 packed variant writing, it was missing one byte (the "is packed" flag). diff -r cc4570c0bca5 -r d02514ceed91 tools/lib64fmts.c --- 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;