mirror of https://github.com/x64dbg/GleeBug
ConvertVAtoFileOffsetEx
* now returns 0 on error (and not INVALID_VALUE => -1)
* implementation for ReturnType
In short I just copied that from:
c5aed9fccc/StaticEngine/Emulator.h (L507)
This commit is contained in:
parent
c5aed9fccc
commit
07ec166b94
|
|
@ -590,7 +590,10 @@ public:
|
||||||
__debugbreak(); //return 0;
|
__debugbreak(); //return 0;
|
||||||
if(!found->second.pe->IsValidPe())
|
if(!found->second.pe->IsValidPe())
|
||||||
__debugbreak(); //return 0;
|
__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>
|
template<typename T>
|
||||||
|
|
@ -1200,4 +1203,4 @@ private: //variables
|
||||||
STEPCALLBACK mCbATTACHBREAKPOINT = nullptr;
|
STEPCALLBACK mCbATTACHBREAKPOINT = nullptr;
|
||||||
PROCESS_INFORMATION* mAttachProcessInfo = nullptr;
|
PROCESS_INFORMATION* mAttachProcessInfo = nullptr;
|
||||||
wchar_t szDebuggeeName[MAX_PATH] = L"";
|
wchar_t szDebuggeeName[MAX_PATH] = L"";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue