changeset 1715:c0c6fd8b288a

Use dmGenericRLEOutputRun().
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 06 Jun 2018 14:33:30 +0300
parents 95317672ff00
children 9731b0bdec64
files tools/lib64gfx.c
diffstat 1 files changed, 2 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Wed Jun 06 14:31:20 2018 +0300
+++ b/tools/lib64gfx.c	Wed Jun 06 14:33:30 2018 +0300
@@ -448,14 +448,8 @@
             }
         }
 
-        while (count--)
-        {
-            if (!dmGrowBufPutU8(dst, data))
-            {
-                res = DMERR_MALLOC;
-                goto out;
-            }
-        }
+        if ((res = dmGenericRLEOutputRun(dst, cfg, data, count)) != DMERR_OK)
+            goto out;
     }
 
     res = DMERR_OK;