changeset 1448:50402c225ef4

Do not insert load address to the buffer beginning in dmC64EncodeGenericBMP().
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 10 May 2018 05:23:02 +0300
parents de5f7e31a8bf
children c1f59416d713
files tools/lib64gfx.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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;