From 4d8ba938f14411f5eb7de6b9054985e0d36fa634 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 25 Aug 2023 17:36:42 -0600 Subject: [PATCH] temporal: during cut(), break out of loop once we pass the end time --- libs/temporal/tempo.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index d89552d665..f72194b11f 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -888,7 +888,11 @@ TempoMap::cut_copy (timepos_t const & start, timepos_t const & end, bool copy, b * time here. */ - if (p->sclock() < start_sclock || p->sclock() >= end_sclock) { + if (p->sclock() >= end_sclock) { + break; + } + + if (p->sclock() < start_sclock) { ++p; continue; }