changeset 2020:57a2527ff63d

Fix IFF chunk padding.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 25 Oct 2018 18:47:10 +0300
parents e809e323fdde
children c8c698bb99b6
files tools/libgfx.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/libgfx.c	Thu Oct 25 17:45:38 2018 +0300
+++ b/tools/libgfx.c	Thu Oct 25 18:47:10 2018 +0300
@@ -1944,10 +1944,13 @@
     chunk->size = curr - chunk->offs - (sizeof(Uint32) * 2);
     if (chunk->size & 1)
     {
+        dmMsg(3, "Padding chunk ID '%s', size %d ++\n",
+            chunk->idStr, chunk->size);
+
         if (!dmf_write_byte(fp, 0))
             return dmferror(fp);
 
-        chunk->size++;
+        curr++;
     }
 
     if (dmfseek(fp, chunk->offs, SEEK_SET) < 0)