changeset 1501:9ccf973f65ac

Add static const global for FunPaint 2 magic ID string.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 11 May 2018 07:13:46 +0300
parents 3223d01ac8e8
children aa87cb6cf33b
files tools/lib64gfx.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64gfx.c	Fri May 11 07:12:37 2018 +0300
+++ b/tools/lib64gfx.c	Fri May 11 07:13:46 2018 +0300
@@ -696,13 +696,15 @@
 
 
 #define FUNPAINT2_HEADER_SIZE (0x10)
+static const char *fmtFunPaint2MagicID = "FUNPAINT (MT) ";
+
 
 static BOOL fmtProbeFunPaint2Header(const Uint8 *buf, const size_t len, const DMC64ImageFormat *fmt)
 {
     return
         len > 30 &&
         dmCompareAddr16(buf, 0, fmt->addr) &&
-        strncmp((const char *) (buf + 2), "FUNPAINT (MT) ", 14) == 0;
+        strncmp((const char *) (buf + 2), fmtFunPaint2MagicID, strlen(fmtFunPaint2MagicID)) == 0;
 }