mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 08:11:51 +00:00
Error report fix
This commit is contained in:
parent
912072e60c
commit
130f7905ba
@ -1685,7 +1685,7 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp)
|
||||
}
|
||||
|
||||
std::vector<HMODULE> modules;
|
||||
for (DWORD size = 256; modules.size() < size; size /= sizeof(HMODULE))
|
||||
for (DWORD size = 256; modules.size() != size; size /= sizeof(HMODULE))
|
||||
{
|
||||
modules.resize(size);
|
||||
if (!EnumProcessModules(GetCurrentProcess(), modules.data(), size * sizeof(HMODULE), &size))
|
||||
@ -1718,13 +1718,13 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp)
|
||||
if (pExp->ContextRecord->Rip >= base && pExp->ContextRecord->Rip < base + info.SizeOfImage)
|
||||
{
|
||||
std::string module_name;
|
||||
for (DWORD size = 256; module_name.size() < size;)
|
||||
for (DWORD size = 15; module_name.size() != size;)
|
||||
{
|
||||
module_name.resize(size);
|
||||
size = GetModuleBaseNameA(GetCurrentProcess(), module, &module_name.front(), size);
|
||||
size = GetModuleBaseNameA(GetCurrentProcess(), module, &module_name.front(), size + 1);
|
||||
if (!size)
|
||||
{
|
||||
module_name.resize(1, '\0');
|
||||
module_name.clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user