summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2023-10-09 01:21:46 +0200
committerRay <[email protected]>2023-10-09 01:21:46 +0200
commit5ed7717f0d9e524b72f1bddc6fcd3e2e5f32e217 (patch)
treeeb530b3efb0abeb7ef1df6036afeefa1eafa9c05 /src
parenta0b30b0363cfbadb359db87ffd8fa80748485980 (diff)
downloadraylib-5ed7717f0d9e524b72f1bddc6fcd3e2e5f32e217.tar.gz
raylib-5ed7717f0d9e524b72f1bddc6fcd3e2e5f32e217.zip
REVIEWED: `WaitTime()`, added validation #3377
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 3a8820e3..69b5e1a8 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -2290,6 +2290,8 @@ void InitTimer(void)
// Ref: http://www.geisswerks.com/ryan/FAQS/timing.html --> All about timing on Win32!
void WaitTime(double seconds)
{
+ if (seconds < 0) return;
+
#if defined(SUPPORT_BUSY_WAIT_LOOP) || defined(SUPPORT_PARTIALBUSY_WAIT_LOOP)
double destinationTime = GetTime() + seconds;
#endif