From 5f67bbe5e48f6f54233c0ba73cbd6f54930fae11 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 1 Feb 2021 18:33:35 -0700 Subject: [PATCH] fix dangling and incorrect use of numeric_limits as a control event position --- libs/ardour/automatable.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 4bc646cc64..4101a7b7e1 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -667,7 +667,7 @@ Automatable::find_next_event (timepos_t const & start, timepos_t const & end, Ev } } } - return next_event.when != (start <= end ? std::numeric_limits::max() : 0); + return next_event.when != (start <= end ? timepos_t::max (start.time_domain()) : timepos_t (start.time_domain())); } void