1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-03 14:13:11 +02:00

(bug 215) Fixes problem where non-silent region is truncated

This commit is contained in:
BusinessmanProgrammerSteve 2010-09-03 05:57:43 +00:00
parent 1b8a8cb8bc
commit 99581b4dc5

View File

@ -709,6 +709,13 @@ void EffectTruncSilence::Intersect(RegionList &dest, const RegionList &src)
bool lastRun = false; // must run the loop one extra time
RegionList::const_iterator srcIter = src.begin();
// This logic, causing the loop to run once after end of src, must occur
// each time srcIter is updated
if (srcIter == src.end()) {
lastRun = true;
}
while (srcIter != src.end() || lastRun)
{
// Don't use curSrc unless lastRun is false!