Mercurial > hg > dmlib
diff tools/gfxconv.c @ 1585:a076c9d9b321
Improve error handling.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 14 May 2018 03:39:07 +0300 |
parents | f1b279ba47a8 |
children | ca087c0cc9c4 |
line wrap: on
line diff
--- a/tools/gfxconv.c Mon May 14 02:38:24 2018 +0300 +++ b/tools/gfxconv.c Mon May 14 03:39:07 2018 +0300 @@ -1057,10 +1057,15 @@ int res = DMERR_OK; DMGrowBuf buf; + dmGrowBufInit(&buf); + // Encode to target format dmMsg(1, "Encoding C64 bitmap data to format '%s'\n", fmt->name); if ((res = dmC64EncodeBMP(&buf, image, fmt)) != DMERR_OK) + { + dmErrorMsg("Error encoding bitmap data: %s\n", dmErrorStr(res)); goto error; + } // And output the file dmMsg(1, "Writing output file '%s'\n", filename);