changeset 2624:75382239c95c

Print format name in Cosmos Designs Hires Manager RLE unpacker error messages.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 29 Nov 2023 20:52:08 +0200
parents da81e524162e
children 84d6b7805b7f
files tools/lib64fmts.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Wed Nov 29 13:28:42 2023 +0200
+++ b/tools/lib64fmts.c	Wed Nov 29 20:52:08 2023 +0200
@@ -1582,7 +1582,8 @@
     if ((dstBuf = dmMalloc0(dstSize)) == NULL)
     {
         return dmError(DMERR_MALLOC,
-            "Could not allocate memory for RLE decoding buffer.\n");
+            "%s: Could not allocate memory for RLE decoding buffer.\n",
+            fmt->name);
     }
 
     // Setup input and output offsets
@@ -1602,7 +1603,8 @@
             if (srcOffs < 3)
             {
                 res = dmError(DMERR_INVALID_DATA,
-                    "RLE: Invalid data/out of data for run sequence.\n");
+                    "%s: RLE: Invalid data/out of data for run sequence.\n",
+                    fmt->name);
                 goto out;
             }