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:
parent
1b8a8cb8bc
commit
99581b4dc5
@ -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!
|
||||
|
Loading…
x
Reference in New Issue
Block a user