diff minijss/jloadxm.c @ 796:97ecc0a9c21f

Silence some "probing".
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 18 Oct 2013 19:47:30 +0300
parents a4cf7716ba58
children b8bfd9fbe1d9
line wrap: on
line diff
--- a/minijss/jloadxm.c	Fri Oct 18 19:40:44 2013 +0300
+++ b/minijss/jloadxm.c	Fri Oct 18 19:47:30 2013 +0300
@@ -603,7 +603,7 @@
 
 /* Load XM-format module from given file-stream
  */
-int jssLoadXM(DMResource *inFile, JSSModule **ppModule)
+int jssLoadXM(DMResource *inFile, JSSModule **ppModule, BOOL probe)
 {
     JSSModule *module;
     XMHeader xmH;
@@ -634,8 +634,11 @@
     // Check the fields, none of these are considered fatal
     if (strncmp(xmH.idMagic, "Extended Module: ", 17) != 0)
     {
-        JSSERROR(DMERR_NOT_SUPPORTED, DMERR_NOT_SUPPORTED,
-        "Not a FT2 Extended Module (XM), ident mismatch!\n");
+        if (probe)
+            return DMERR_NOT_SUPPORTED;
+        else
+            JSSERROR(DMERR_NOT_SUPPORTED, DMERR_NOT_SUPPORTED,
+            "Not a FT2 Extended Module (XM), header signature mismatch!\n");
     }
 
     if (xmH.version != 0x0104)