Mercurial > hg > dmlib
diff minijss/jloadjss.c @ 796:97ecc0a9c21f
Silence some "probing".
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 18 Oct 2013 19:47:30 +0300 |
parents | ed60a7ee3ebb |
children | de25e0f2b856 |
line wrap: on
line diff
--- a/minijss/jloadjss.c Fri Oct 18 19:40:44 2013 +0300 +++ b/minijss/jloadjss.c Fri Oct 18 19:47:30 2013 +0300 @@ -295,7 +295,7 @@ #endif -int jssLoadJSSMOD(DMResource *inFile, JSSModule **ppModule) +int jssLoadJSSMOD(DMResource *inFile, JSSModule **ppModule, BOOL probe) { JSSModule *module; JSSMODHeader jssH; @@ -309,8 +309,11 @@ if (memcmp(jssH.idMagic, "JM", 2) != 0) { - JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA, - "Not a valid JSSMOD file, header signature missing!\n"); + if (probe) + return DMERR_NOT_SUPPORTED; + else + JSSERROR(DMERR_NOT_SUPPORTED, DMERR_NOT_SUPPORTED, + "Not a JSSMOD file, header signature mismatch!\n"); } if (jssH.idVersion != JSSMOD_VERSION)