diff --git a/src/engine/fileOps/it.cpp b/src/engine/fileOps/it.cpp index e3be8b09b..fe799ff6e 100644 --- a/src/engine/fileOps/it.cpp +++ b/src/engine/fileOps/it.cpp @@ -136,6 +136,12 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) { // read instruments for (int i=0; itype=DIV_INS_ES5506; + + if (insPtr[i]==0) { + ds.ins.push_back(ins); + continue; + } logV("reading instrument %d...",i); if (!reader.seek(insPtr[i],SEEK_SET)) { @@ -252,6 +258,11 @@ bool DivEngine::loadIT(unsigned char* file, size_t len) { for (int i=0; iDIV_MAX_ROWS) { + logE("too many rows! %d",patRows); + lastError="too many rows"; + delete[] file; + return false; + } + reader.readI(); // x dataLen+=reader.tell();