diff --git a/libs/temporal/beats.cc b/libs/temporal/beats.cc index 9699c94916..b8d2ddfc77 100644 --- a/libs/temporal/beats.cc +++ b/libs/temporal/beats.cc @@ -46,8 +46,14 @@ Beats::round_to_subdivision (int subdivision, RoundMode dir) const { BBT_Time bbt (metric.bbt_at (*this)); if (dir < 0) { + if (dir == RoundDownAlways && bbt.ticks == 0) { + bbt = metric.bbt_subtract (bbt, Temporal::BBT_Offset (0, 0, 1)); + } bbt = metric.meter().round_down_to_bar (bbt); } if (dir > 0) { + if (dir == RoundUpAlways && bbt.ticks == 0) { + bbt.ticks += 1; + } bbt = metric.meter().round_up_to_bar (bbt); } else { bbt = metric.meter().round_to_bar (bbt);