changeset 2344:13e54305e5fc

Move two memsets to later in the function.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 25 Sep 2019 12:13:28 +0300
parents 94a653883a32
children fe025c461760 71d94f965725
files tools/lib64gfx.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Wed Sep 25 12:11:35 2019 +0300
+++ b/tools/lib64gfx.c	Wed Sep 25 12:13:28 2019 +0300
@@ -1404,8 +1404,6 @@
     DMC64ScanLine scan;
 
     (void) spec;
-    dmMemset(dst->data, 0, dst->size);
-    dmMemset(&scan, 0, sizeof(scan));
 
     // Check pixel getter function
     if (src->fmt->getPixel != NULL)
@@ -1424,6 +1422,9 @@
                 src->extraInfo[D64_EI_MODE]);
     }
 
+    dmMemset(dst->data, 0, dst->size);
+    dmMemset(&scan, 0, sizeof(scan));
+
     // Perform conversion
     for (int yc = 0; yc < dst->height; yc++)
     {