From bfab34e478ef63d2cbcf038afde769e8e51cfaa3 Mon Sep 17 00:00:00 2001 From: Fred Gleason Date: Tue, 9 Jun 2020 09:00:48 -0400 Subject: [PATCH] 2020-06-09 Fred Gleason * Fixed a cast overflow bug in rdairplay(1) that cause incorrect pie timer indications after adding or deleting events to a running log. Signed-off-by: Fred Gleason --- ChangeLog | 4 ++++ rdairplay/rdairplay.cpp | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 83538213..6c0be824 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19864,3 +19864,7 @@ 2020-06-08 Fred Gleason * Fixed a bug in rdairplay(1) where a paused event could not be removed by dropping the empty cart on it. +2020-06-09 Fred Gleason + * Fixed a cast overflow bug in rdairplay(1) that cause incorrect + pie timer indications after adding or deleting events to a running + log. diff --git a/rdairplay/rdairplay.cpp b/rdairplay/rdairplay.cpp index c882017b..21992d32 100644 --- a/rdairplay/rdairplay.cpp +++ b/rdairplay/rdairplay.cpp @@ -1724,16 +1724,18 @@ void MainWidget::transportChangedData() case RDAirPlayConf::CartTransition: if((next_logline=air_log[0]-> logLine(air_log[0]->nextLine(line)))!=NULL) { - if((unsigned)logline->startTime(RDLogLine::Actual). + // + // Are we not past the segue point? + // + if((logline->playPosition()> + (unsigned)logline->segueLength(next_logline->transType()))|| + ((unsigned)logline->startTime(RDLogLine::Actual). msecsTo(QTime::currentTime())< logline->segueLength(next_logline->transType())- - logline->playPosition()) { + logline->playPosition())) { air_pie_counter-> setTime(logline->segueLength(next_logline->transType())); } - else { - air_pie_counter->setTime(logline->effectiveLength()); - } } else { air_pie_counter->setTime(logline->effectiveLength());