Fixed toolhelp routines usage in GetModuleFromPath (reported by Bertho

Stultiens).
This commit is contained in:
Alexandre Julliard 1999-04-18 13:18:42 +00:00
parent 2043ba0675
commit db000ee3e8

View file

@ -1442,7 +1442,8 @@ static HMODULE16 GetModuleFromPath(LPCSTR name)
{
check_path:
lookforit.dwSize=sizeof(MODULEENTRY);
for(ModuleFirst16(&lookforit); ModuleNext16(&lookforit); )
if (!ModuleFirst16(&lookforit)) return 0;
do
{
pModule = NE_GetPtr(lookforit.hModule);
if(!pModule)
@ -1459,7 +1460,7 @@ check_path:
break;
}
}
}
} while (ModuleNext16(&lookforit));
}
if(TRACE_ON(module) && hmod)