From f720a6201b228f406ff1cc7b4e58f12dbfaf93c3 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 29 Mar 2020 18:36:57 -0400 Subject: [PATCH] Adds explicit type cast. --- Storage/Disk/Drive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Disk/Drive.cpp b/Storage/Disk/Drive.cpp index b79f87532..e8a5a461f 100644 --- a/Storage/Disk/Drive.cpp +++ b/Storage/Disk/Drive.cpp @@ -45,7 +45,7 @@ void Drive::set_rotation_speed(float revolutions_per_minute) { // From there derive the appropriate rotational multiplier and possibly update the // count of cycles since the index hole proportionally. const float new_rotational_multiplier = float(cycles_per_revolution_) / float(get_input_clock_rate()); - cycles_since_index_hole_ *= new_rotational_multiplier / rotational_multiplier_; + cycles_since_index_hole_ = Cycles::IntType(float(cycles_since_index_hole_) * new_rotational_multiplier / rotational_multiplier_); rotational_multiplier_ = new_rotational_multiplier; cycles_since_index_hole_ %= cycles_per_revolution_; }