comparison 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
comparison
equal deleted inserted replaced
2080:7e4087e2740d 2081:a14286e2710e
1699 return DMERR_MALLOC; 1699 return DMERR_MALLOC;
1700 1700
1701 // Decode the chunk 1701 // Decode the chunk
1702 if (iff->idsig == IFF_ID_ACBM) 1702 if (iff->idsig == IFF_ID_ACBM)
1703 { 1703 {
1704 // Initialize destination image data
1705 dmMemset(img->data, 0, img->size);
1706
1704 for (int plane = 0; plane < nplanes; plane++) 1707 for (int plane = 0; plane < nplanes; plane++)
1705 { 1708 {
1706 // Decompress or read data 1709 // Decompress or read data
1707 if (!dmIFFReadOneRow(fp, iff, buf, bufLen)) 1710 if (!dmIFFReadOneRow(fp, iff, buf, bufLen))
1708 { 1711 {