From a1f254a0bcc930a23856f2d2a21b5f862d9e4628 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 17 Feb 2025 16:59:50 +0100 Subject: [PATCH] ensure proper casting for elapsedseconds --- src/i_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_time.c b/src/i_time.c index a1ef580bd..931696379 100644 --- a/src/i_time.c +++ b/src/i_time.c @@ -61,7 +61,7 @@ void I_UpdateTime(fixed_t timescale) ticratescaled = (double)TICRATE * FIXED_TO_FLOAT(timescale); enterprecise = I_GetPreciseTime(); - elapsedseconds = (double)(enterprecise - oldenterprecise) / I_GetPrecisePrecision(); + elapsedseconds = (double)((INT64)enterprecise - oldenterprecise) / I_GetPrecisePrecision(); tictimer += elapsedseconds; while (tictimer > 1.0/ticratescaled) {