From c52d16c7599ccccf49d74892069cf6c465d52160 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Wed, 18 Apr 2007 13:39:26 +0000 Subject: [PATCH] use the correct index in Module32Next svn path=/trunk/; revision=26395 --- reactos/dll/win32/kernel32/misc/toolhelp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/dll/win32/kernel32/misc/toolhelp.c b/reactos/dll/win32/kernel32/misc/toolhelp.c index fe76756dfa5..42f0a433f00 100644 --- a/reactos/dll/win32/kernel32/misc/toolhelp.c +++ b/reactos/dll/win32/kernel32/misc/toolhelp.c @@ -760,11 +760,11 @@ Module32NextW(HANDLE hSnapshot, LPMODULEENTRY32W lpme) { BOOL Ret; - if(Snapshot->ModuleListCount > 0 && - Snapshot->ModuleListIndex < Snapshot->ModuleListCount) + if((Snapshot->ModuleListCount > 0) && + (Snapshot->ModuleListIndex < Snapshot->ModuleListCount)) { LPMODULEENTRY32W Entries = (LPMODULEENTRY32W)OffsetToPtr(Snapshot, Snapshot->ModuleListOffset); - RtlCopyMemory(lpme, &Entries[Snapshot->ProcessListIndex++], sizeof(MODULEENTRY32W)); + RtlCopyMemory(lpme, &Entries[Snapshot->ModuleListIndex++], sizeof(MODULEENTRY32W)); Ret = TRUE; } else