From 4ec91b8b42afca23bf74766cb34671f63e343af7 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 4 Apr 2022 00:12:11 -0500 Subject: [PATCH] fix .fui instruments not loading! --- src/engine/fileOpsIns.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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";