From 2df6854dcfb0cea7ac94e431c8997f46c977e4ef Mon Sep 17 00:00:00 2001 From: headshot2017 <> Date: Thu, 14 Mar 2024 21:44:06 -0400 Subject: [PATCH] fix waitable milliseconds overflow fixes music immediately starting again after it ends --- src/Platform_Switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Platform_Switch.c b/src/Platform_Switch.c index 2592334d3..57e7f6f09 100644 --- a/src/Platform_Switch.c +++ b/src/Platform_Switch.c @@ -321,7 +321,7 @@ void Waitable_Wait(void* handle) { void Waitable_WaitFor(void* handle, cc_uint32 milliseconds) { struct WaitData* ptr = (struct WaitData*)handle; - cc_uint64 timeout_ns = milliseconds * (1000 * 1000); // to nanoseconds + cc_uint64 timeout_ns = (cc_uint64)milliseconds * (1000 * 1000); // to nanoseconds Mutex_Lock(&ptr->mutex); if (!ptr->signalled) {