diff options
author | wm4 <wm4@nowhere> | 2014-05-22 22:50:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-22 22:50:39 +0200 |
commit | 2e6b0b4ee47d227bcc1d32d23859532592b33386 (patch) | |
tree | 380209cfc618b0511af12398f3b8953b0a5fb9ba /osdep | |
parent | c9b68957c9f79543063dcfa5c8baa417b43e285e (diff) |
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.
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) |