changeset 1828:6e1dd79c6bce

Use dmGrowBufPutU16LE() instead of two dmGrowBufPutU8() to push the loading address into target buffer in dmC64EncodeBMP().
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 22 Jun 2018 13:41:54 +0300
parents d6fbbf7ddba1
children 5639142e0b87
files tools/lib64gfx.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Fri Jun 22 13:40:11 2018 +0300
+++ b/tools/lib64gfx.c	Fri Jun 22 13:41:54 2018 +0300
@@ -1445,8 +1445,7 @@
         goto err;
 
     // Add the loading address
-    if (!dmGrowBufPutU8(buf, DM_GET_ADDR_LO(fmt->addr)) ||
-        !dmGrowBufPutU8(buf, DM_GET_ADDR_HI(fmt->addr)))
+    if (!dmGrowBufPutU16LE(buf, fmt->addr))
         goto err;
 
     // Attempt to encode the image to a buffer