# HG changeset patch # User Matti Hamalainen # Date 1540482430 -10800 # Node ID 57a2527ff63d53ba7fe28e4f56f1b316f1b44f5b # Parent e809e323fdde442a26cb05e6916723b25638a97e Fix IFF chunk padding. diff -r e809e323fdde -r 57a2527ff63d tools/libgfx.c --- 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)