Mercurial > hg > dmlib
changeset 1159:29dc9337fa11
Add a meaningful error message for instrument header read failure.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Mar 2015 07:00:27 +0200 |
parents | 31bc984b7cd4 |
children | b122ad2d3fbe |
files | minijss/jloadxm.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)