1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-05 14:18:53 +02:00

Fix EqualRange for case of zero tolerance

This commit is contained in:
Paul Licameli 2017-05-07 15:28:48 -04:00
parent a26b79d9fb
commit 2e7f806e90

View File

@ -1012,7 +1012,7 @@ std::pair<int, int> Envelope::EqualRange( double when, double sampleTime ) const
{ return point1.GetT() < point2.GetT(); }
);
auto after = first;
while ( after != end && after->GetT() < when + tolerance )
while ( after != end && after->GetT() <= when + tolerance )
++after;
return { first - begin, after - begin };
}