From 52aac111699ffbf679b4fc5722be893d41568394 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 28 Oct 2023 23:02:54 +0200 Subject: [PATCH] Fix theoretical int overflow. --- src/lib/dcpomatic_time.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index 9e7191b1e..1b12ea901 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -217,11 +217,11 @@ public: HMSF hmsf; hmsf.h = ff / (3600 * r); - ff -= hmsf.h * 3600 * r; + ff -= static_cast(hmsf.h) * 3600 * r; hmsf.m = ff / (60 * r); - ff -= hmsf.m * 60 * r; + ff -= static_cast(hmsf.m) * 60 * r; hmsf.s = ff / r; - ff -= hmsf.s * r; + ff -= static_cast(hmsf.s) * r; hmsf.f = static_cast (ff); return hmsf; -- 2.30.2