From 2a2e04c65347ba90cdb7d841ff2c8ca0adcf531f Mon Sep 17 00:00:00 2001 From: John Hodge Date: Fri, 24 Feb 2012 00:03:10 +0800 Subject: [PATCH] Kernel - Slight semaphore fix --- KernelLand/Kernel/semaphore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/KernelLand/Kernel/semaphore.c b/KernelLand/Kernel/semaphore.c index d4583e74..e43547a2 100644 --- a/KernelLand/Kernel/semaphore.c +++ b/KernelLand/Kernel/semaphore.c @@ -33,6 +33,7 @@ int Semaphore_Wait(tSemaphore *Sem, int MaxToTake) if( MaxToTake < 0 ) { Log_Warning("Threads", "Semaphore_Wait: User bug - MaxToTake(%i) < 0, Sem=%p(%s)", MaxToTake, Sem, Sem->Name); + MaxToTake = 0; } SHORTLOCK( &Sem->Protector ); -- 2.20.1