# HG changeset patch # User Matti Hamalainen # Date 1578943017 -7200 # Node ID c5a32812dd97c380e90eb3d1f6eee06ba05e16ca # Parent b153bc46241dd64ca24207bc3056052618708606 Oops, forgot to set up the DMC64EncDecCtx::buf to point to the correct DMGrowBuf (source or destination) in dmC64EncodeGenericBMP() and dmC64DecodeGenericBMP(). Fixed. diff -r b153bc46241d -r c5a32812dd97 tools/lib64gfx.c --- a/tools/lib64gfx.c Mon Jan 13 20:30:23 2020 +0200 +++ b/tools/lib64gfx.c Mon Jan 13 21:16:57 2020 +0200 @@ -914,6 +914,7 @@ return DMERR_NULLPTR; dmC64SetupImageData(img, fmt); + ctx.buf = buf; // Perform decoding for (ctx.opn = 0; ctx.opn < D64_MAX_ENCDEC_OPS; ctx.opn++) @@ -1117,6 +1118,8 @@ "Buffer specified for dmC64EncodeGenericBMP() is in backwards mode, which is not supported.\n"); } + ctx.buf = buf; + // Perform encoding for (ctx.opn = 0; ctx.opn < D64_MAX_ENCDEC_OPS; ctx.opn++) {