Commit db000ee3 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed toolhelp routines usage in GetModuleFromPath (reported by Bertho

Stultiens).
parent 2043ba06
......@@ -1442,8 +1442,9 @@ 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)
break;
......@@ -1459,7 +1460,7 @@ check_path:
break;
}
}
}
} while (ModuleNext16(&lookforit));
}
if(TRACE_ON(module) && hmod)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment