changeset 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 7e4087e2740d
children a0a6f5a3fbbf
files tools/libgfx.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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