changeset 1824:adf9f05c26e1

Improve error handling of dmC64MemBlockCopy().
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 22 Jun 2018 12:22:33 +0300
parents 02f604264bc4
children c22d3b309f34
files tools/lib64gfx.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Fri Jun 22 12:21:54 2018 +0300
+++ b/tools/lib64gfx.c	Fri Jun 22 12:22:33 2018 +0300
@@ -183,9 +183,10 @@
             return DMERR_MALLOC;
 
         memcpy(dst->data, src->data, src->size);
+        return DMERR_OK;
     }
-
-    return DMERR_OK;
+    else
+        return DMERR_INVALID_DATA;
 }