From 32593eb61c3babe07e6570b8d096c02f0aefdc0d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 26 May 2010 20:41:58 +0000 Subject: [PATCH] logic error in AutomationEvent::cut_copy_clear() when deciding whether to add an extra final point to an automation list git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@7169 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/automation_event.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc index 28b7dde050..f1cdd52c87 100644 --- a/libs/ardour/automation_event.cc +++ b/libs/ardour/automation_event.cc @@ -1147,11 +1147,11 @@ AutomationList::cut_copy_clear (double start, double end, int op) /* only add a boundary point if there is a point after "end" */ - if (op == 0 && (e != events.end() || end < (*e)->when)) { // cut + if (op == 0 && (e != events.end() && end < (*e)->when)) { // cut events.insert (e, point_factory (end, end_value)); } - if (op != 2 && (e != events.end() || end < (*e)->when)) { // cut/copy + if (op != 2 && (e != events.end() && end < (*e)->when)) { // cut/copy nal->events.push_back (point_factory (end - start, end_value)); } }