# HG changeset patch # User Matti Hamalainen # Date 1530020943 -10800 # Node ID 571109a14967e2cc9c3a50552d7c9396382e872c # Parent 09d46bf9fe713c071726e86fd99ab90917781c7c Add some more informative messages in IFF loader. diff -r 09d46bf9fe71 -r 571109a14967 tools/libgfx.c --- 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