1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-12 15:46:25 +01:00

[bug 451] Notify on the error where "len" tag (which is still valid, not legacy) for a "waveblock" is greater than mMaxSamples (max samples per block).

This commit is contained in:
v.audacity
2011-09-29 01:48:56 +00:00
parent 0e83c5d13f
commit 6eb3a524be

View File

@@ -738,10 +738,15 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
if (!wxStrcmp(attr, wxT("start")))
wb->start = nValue;
// Handle length tag from legacy project file
if (!wxStrcmp(attr, wxT("len")))
{
if (nValue > mMaxSamples) // mMaxSamples should already have been set by calls to the "sequence" clause below.
{
mErrorOpening = true;
return false;
}
mDirManager->SetLoadingBlockLength(nValue);
}
} // while
mBlock->Add(wb);