# HG changeset patch # User Matti Hamalainen # Date 1425531627 -7200 # Node ID 29dc9337fa11f6914e1e95ffd5bbf2bc53bad24e # Parent 31bc984b7cd449e6bc732143bf91fd8dea173acf Add a meaningful error message for instrument header read failure. diff -r 31bc984b7cd4 -r 29dc9337fa11 minijss/jloadxm.c --- a/minijss/jloadxm.c Thu Mar 05 07:00:02 2015 +0200 +++ b/minijss/jloadxm.c Thu Mar 05 07:00:27 2015 +0200 @@ -502,7 +502,10 @@ !dmf_read_str(inFile, &xmI1.instName, sizeof(xmI1.instName)) || !dmf_read_byte(inFile, &xmI1.instType) || !dmf_read_le16(inFile, &xmI1.nsamples)) - return DMERR_FREAD; + { + JSSERROR(DMERR_FREAD, DMERR_FREAD, + "Failed to read primary extended instrument header #%d\n", ninst); + } // If there are samples, there is header #2 if (xmI1.nsamples == 0)