diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-28 23:02:54 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-28 23:02:54 +0200 |
| commit | 52aac111699ffbf679b4fc5722be893d41568394 (patch) | |
| tree | cd413348dd60e5cb8b7f3ae238f0475d58321ad9 /src | |
| parent | f8661a47b8ddafb6a076456d4d1b9239aa45e4b1 (diff) | |
Fix theoretical int overflow.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/dcpomatic_time.h | 6 |
1 files 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<int64_t>(hmsf.h) * 3600 * r; hmsf.m = ff / (60 * r); - ff -= hmsf.m * 60 * r; + ff -= static_cast<int64_t>(hmsf.m) * 60 * r; hmsf.s = ff / r; - ff -= hmsf.s * r; + ff -= static_cast<int64_t>(hmsf.s) * r; hmsf.f = static_cast<int> (ff); return hmsf; |
