# HG changeset patch # User Matti Hamalainen # Date 1425919572 -7200 # Node ID 60dc14a2e4c58dca4298def4fe4e9ad4de95d733 # Parent d88d5f88b77aaf241ef756e6cae655b4a6104e73 Cosmetics. diff -r d88d5f88b77a -r 60dc14a2e4c5 minijss/jloadjss.c --- a/minijss/jloadjss.c Mon Mar 09 17:43:09 2015 +0200 +++ b/minijss/jloadjss.c Mon Mar 09 18:46:12 2015 +0200 @@ -426,7 +426,7 @@ if (jssP.nrows == 0 || jssP.nrows > jsetMaxRows) JSSERROR(DMERR_INVALID_DATA, DMERR_INVALID_DATA, "Invalid number of rows in pattern #%d: %d.\n", - index, jssP.nrows + index, jssP.nrows); // Allocate pattern pattern = module->patterns[index] = jssAllocatePattern(jssP.nrows, module->nchannels); diff -r d88d5f88b77a -r 60dc14a2e4c5 minijss/jloadxm.c --- a/minijss/jloadxm.c Mon Mar 09 17:43:09 2015 +0200 +++ b/minijss/jloadxm.c Mon Mar 09 18:46:12 2015 +0200 @@ -752,11 +752,13 @@ } // Allocate instrument + JSSDEBUG("Allocating extended instrument #%d [%d]\n", + neinst, module->nextInstruments); + if ((einst = jssAllocateExtInstrument()) == NULL) - { JSSERROR(DMERR_MALLOC, DMERR_MALLOC, - "Could not allocate extended instrument structure #%d\n", neinst); - } + "Could not allocate extended instrument #%d.\n", + neinst); module->extInstruments[neinst] = einst; @@ -887,11 +889,9 @@ XMHeader xmH; int index, ret = DMERR_OK; - assert(pmodule != NULL); - assert(inFile != NULL); *pmodule = NULL; - // Try to get the XM-header + // Try to read the XM header if (!dmf_read_str(inFile, &xmH.idMagic, sizeof(xmH.idMagic)) || !dmf_read_str(inFile, &xmH.songName, sizeof(xmH.songName)) || !dmf_read_byte(inFile, &xmH.unUsed1A) || @@ -908,7 +908,6 @@ !dmf_read_le16(inFile, &xmH.defTempo)) return DMERR_FREAD; - // Check the fields, none of these are considered fatal if (strncmp(xmH.idMagic, "Extended Module: ", 17) != 0) { @@ -1073,6 +1072,5 @@ } out: - return ret; }