From 2e6b0b4ee47d227bcc1d32d23859532592b33386 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 May 2014 22:50:39 +0200 Subject: timer: fix previous commit Sigh... of course the type of the (?:) exprsssion is double, so INT64_MAX was converted to double, which is a problem. --- osdep/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'osdep/timer.c') diff --git a/osdep/timer.c b/osdep/timer.c index 06ee7647e5..583a94c28a 100644 --- a/osdep/timer.c +++ b/osdep/timer.c @@ -70,7 +70,7 @@ int64_t mp_add_timeout(int64_t time_us, double timeout_sec) { assert(time_us > 0); // mp_time_us() returns strictly positive values double t = MPCLAMP(timeout_sec * (1000 * 1000), -0x1p63, 0x1p63); - int64_t ti = t == 0x1p63 ? INT64_MAX : t; + int64_t ti = t == 0x1p63 ? INT64_MAX : (int64_t)t; if (ti > INT64_MAX - time_us) return INT64_MAX; if (ti <= -time_us) -- cgit v1.2.3