diff tools/libgfx.c @ 2081:a14286e2710e

Initialize the destination image data in case of IFF ACBM loading.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 10 Dec 2018 20:35:18 +0200
parents b2f1ce24f81b
children a0a6f5a3fbbf
line wrap: on
line diff
--- a/tools/libgfx.c	Mon Dec 10 19:36:48 2018 +0200
+++ b/tools/libgfx.c	Mon Dec 10 20:35:18 2018 +0200
@@ -1701,6 +1701,9 @@
     // Decode the chunk
     if (iff->idsig == IFF_ID_ACBM)
     {
+        // Initialize destination image data
+        dmMemset(img->data, 0, img->size);
+
         for (int plane = 0; plane < nplanes; plane++)
         {
             // Decompress or read data