Fix incorrectly getting the exe address

This commit is contained in:
Dr. Chat 2015-07-05 15:41:47 -05:00
parent 778acac929
commit 567bb525f8
1 changed files with 2 additions and 2 deletions

View File

@ -297,11 +297,11 @@ bool XexModule::Load(const std::string& name, const std::string& path,
bool XexModule::Unload() {
// Just deallocate the memory occupied by the exe
uint32_t exe_address = 0;
xe::be<uint32_t>* exe_address = 0;
GetOptHeader(XEX_HEADER_IMAGE_BASE_ADDRESS, &exe_address);
assert_not_zero(exe_address);
memory()->LookupHeap(exe_address)->Release(exe_address);
memory()->LookupHeap(*exe_address)->Release(*exe_address);
assert_not_null(xex_header_); // Unloading a module that wasn't loaded?
delete[] xex_header_;