From 9ac831b09c7a75bb7095f7148111ca6ecb607fc7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 11 Sep 2017 22:24:24 -0400 Subject: [PATCH] Added an additional protection against overflow. --- Storage/TimedEventLoop.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Storage/TimedEventLoop.cpp b/Storage/TimedEventLoop.cpp index ad54c1051..43d1aee86 100644 --- a/Storage/TimedEventLoop.cpp +++ b/Storage/TimedEventLoop.cpp @@ -84,6 +84,7 @@ void TimedEventLoop::set_next_event_time_interval(Time interval) { assert(cycles_until_event_ >= 0); subcycles_until_event_.length = (unsigned int)(numerator % denominator); subcycles_until_event_.clock_rate = (unsigned int)denominator; + subcycles_until_event_.simplify(); } Time TimedEventLoop::get_time_into_next_event() {