use the correct index in Module32Next

svn path=/trunk/; revision=26395
This commit is contained in:
Christoph von Wittich
2007-04-18 13:39:26 +00:00
parent 1b8f5cd0bb
commit c52d16c759
+3 -3
View File
@@ -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