# HG changeset patch # User Matti Hamalainen # Date 1525918982 -10800 # Node ID 50402c225ef429414b05560be574c2a62eefa739 # Parent de5f7e31a8bf0971582bd20eba1ecbc53ab41561 Do not insert load address to the buffer beginning in dmC64EncodeGenericBMP(). diff -r de5f7e31a8bf -r 50402c225ef4 tools/lib64gfx.c --- a/tools/lib64gfx.c Thu May 10 05:15:25 2018 +0300 +++ b/tools/lib64gfx.c Thu May 10 05:23:02 2018 +0300 @@ -1285,7 +1285,7 @@ for (int i = 0; i < D64_MAX_ENCDEC_OPS; i++) { const DMC64EncDecOp *op = &fmt->encdecOps[i]; - Uint8 *dst = 2 + buf + op->offs; + Uint8 *dst = buf + op->offs; size_t size, chksize; // Check for last operator @@ -1307,7 +1307,7 @@ } // Do we need to reallocate some more space? - chksize = op->offs + size + 2; + chksize = op->offs + size; if (chksize > allocated) { size_t diff = allocated - chksize, @@ -1395,8 +1395,7 @@ } } - buf[0] = DM_GET_ADDR_LO(fmt->addr); - buf[1] = DM_GET_ADDR_HI(fmt->addr); + res = DMERR_OK; err: *pbuf = buf;