* dll_init.cc (dll_list::alloc): Take long UNC paths into account.
This commit is contained in:
@@ -180,7 +180,14 @@ dll_list::alloc (HINSTANCE h, per_process *p, dll_type type)
|
||||
GetModuleFileNameW (h, buf, sizeof (buf));
|
||||
PWCHAR name = buf;
|
||||
if (!wcsncmp (name, L"\\\\?\\", 4))
|
||||
name += 4;
|
||||
{
|
||||
name += 4;
|
||||
if (!wcsncmp (name, L"UNC\\", 4))
|
||||
{
|
||||
name += 2;
|
||||
*name = L'\\';
|
||||
}
|
||||
}
|
||||
DWORD namelen = wcslen (name);
|
||||
PWCHAR modname = wcsrchr (name, L'\\') + 1;
|
||||
|
||||
|
Reference in New Issue
Block a user