From a09ccb9b30fc83504e726ae003854e86d455c06d Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 29 Nov 2022 00:09:08 -0500 Subject: [PATCH] prevent accidental loading of .brr as DMP --- src/engine/fileOpsIns.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/engine/fileOpsIns.cpp b/src/engine/fileOpsIns.cpp index 9f20f2948..359a7ae39 100644 --- a/src/engine/fileOpsIns.cpp +++ b/src/engine/fileOpsIns.cpp @@ -1980,7 +1980,12 @@ std::vector DivEngine::instrumentFromFile(const char* path, bool format=DIV_INSFORMAT_WOPL; } else if (extS==".wopn") { format=DIV_INSFORMAT_WOPN; - } + } else { + // unknown format + lastError="unknown instrument format"; + delete[] buf; + return ret; + } } switch (format) {