From: Alex Ionescu Date: Tue, 9 Aug 2005 01:07:06 +0000 (+0000) Subject: - Fix broken loop, this fixes the WINE thread wait tests X-Git-Tag: ReactOS-0.2.8~1157 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=69c49f71df2b769442a4d06bf78ad7d2808e4cf4;hp=40602e6777d601c6f8f02522f173cc319e8bb7b3 - Fix broken loop, this fixes the WINE thread wait tests svn path=/trunk/; revision=17222 --- diff --git a/reactos/ntoskrnl/ob/wait.c b/reactos/ntoskrnl/ob/wait.c index b06334c6d90..e93f0a9c36c 100644 --- a/reactos/ntoskrnl/ob/wait.c +++ b/reactos/ntoskrnl/ob/wait.c @@ -182,11 +182,14 @@ NtWaitForMultipleObjects(IN ULONG ObjectCount, /* For a Waitall, we can't have the same object more then once */ if (WaitType == WaitAll) { + /* Clear the main loop variable */ + i = 0; + /* Start the loop */ do { /* Check the current and forward object */ - for (i = 0, j = i + 1; j < ObjectCount; j++) + for (j = i + 1; j < ObjectCount; j++) { /* Make sure they don't match */ if (WaitObjects[i] == WaitObjects[j]) @@ -244,6 +247,7 @@ Quickie: if (LockInUse) KeLeaveCriticalRegion(); /* Return status */ + DPRINT1("Returning: %x\n", Status); return Status; }