Fix a bug in the rva to offset conversion

This commit is contained in:
Duncan Ogilvie 2020-10-09 13:59:22 +02:00
parent ad67ff50fc
commit 4c7aa4a31f
1 changed files with 4 additions and 1 deletions

View File

@ -515,7 +515,10 @@ public:
__debugbreak(); //return 0;
if (!found->second.pe->IsValidPe())
__debugbreak(); //return 0;
return found->second.pe->ConvertRvaToOffset(uint32(AddressToConvert));
auto offset = found->second.pe->ConvertRvaToOffset(uint32(AddressToConvert));
if (offset == INVALID_VALUE)
return 0;
return ReturnType ? FileMapVA + offset : offset;
}
template<typename T>