Merge branch 'master' of git://localhost/acess2
[tpg/acess2.git] / KernelLand / Kernel / semaphore.c
index d4583e7..e43547a 100644 (file)
@@ -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 );

UCC git Repository :: git.ucc.asn.au