diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index a92e52c6b..6689c5547 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -633,7 +633,7 @@ void DivEngine::loadSBI(SafeReader& reader, std::vector& ret, St void DivEngine::loadOPM(SafeReader& reader, std::vector& ret, String& stripPath) { DivInstrument* ins[128]; - memset(ins,0,128*sizeof(DivInstrument*)); + memset(ins,0,128*sizeof(void*)); try { String line; @@ -733,6 +733,8 @@ std::vector DivEngine::instrumentFromFile(const char* path) { delete ins; delete[] buf; return ret; + } else { + ret.push_back(ins); } } catch (EndOfFileException& e) { lastError="premature end of file";