debug dmf not loading again

This commit is contained in:
tildearrow 2023-04-10 00:31:55 -05:00
parent e755f1bbd0
commit 8375256ff7

View file

@ -928,15 +928,17 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
data=newData;
}
logV("length: %d. scaledLen: %d.",length,scaledLen);
if (ds.version>=0x1b) {
if (cutStart<0 || cutStart>scaledLen) {
logE("cutStart is out of range! (%d)",cutStart);
logE("cutStart is out of range! (%d, scaledLen: %d)",cutStart,scaledLen);
lastError="file is corrupt or unreadable at samples";
delete[] file;
return false;
}
if (cutEnd<0 || cutEnd>scaledLen) {
logE("cutEnd is out of range! (%d)",cutEnd);
logE("cutEnd is out of range! (%d, scaledLen: %d)",cutEnd,scaledLen);
lastError="file is corrupt or unreadable at samples";
delete[] file;
return false;