Mercurial > hg > dmlib
changeset 1907:571109a14967
Add some more informative messages in IFF loader.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 26 Jun 2018 16:49:03 +0300 |
parents | 09d46bf9fe71 |
children | 2977baab68db |
files | tools/libgfx.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/libgfx.c Tue Jun 26 15:13:07 2018 +0300 +++ b/tools/libgfx.c Tue Jun 26 16:49:03 2018 +0300 @@ -1520,7 +1520,8 @@ if (chunk->size < minSize) { return dmError(DMERR_OUT_OF_DATA, - "IFF: Chunk is too small.\n"); + "IFF: Chunk %s is too small (%d < %d).\n", + chunk->idStr, chunk->size, minSize); } return DMERR_OK; @@ -1608,6 +1609,7 @@ if (iff->planar) { + // Clear planar decoding buffer dmMemset(dp, 0, img->pitch); for (int plane = 0; plane < nplanes; plane++) @@ -1696,6 +1698,9 @@ iff.planar = (idsig == IFF_ID_ILBM); + dmMsg(3, "IFF: FORM data size %d\n", + chunk.size); + while (!parsed && !dmfeof(fp)) { // Read chunk header