Use std::vector to hold the xex header instead of new/delete
This commit is contained in:
@@ -34,9 +34,11 @@ class XexModule : public xe::cpu::Module {
|
||||
|
||||
xe_xex2_ref xex() const { return xex_; }
|
||||
bool loaded() const { return loaded_; }
|
||||
const xex2_header* xex_header() const { return xex_header_; }
|
||||
const xex2_header* xex_header() const {
|
||||
return reinterpret_cast<const xex2_header*>(xex_header_mem_.data());
|
||||
}
|
||||
const xex2_security_info* xex_security_info() const {
|
||||
return GetSecurityInfo(xex_header_);
|
||||
return GetSecurityInfo(xex_header());
|
||||
}
|
||||
|
||||
// Gets an optional header. Returns NULL if not found.
|
||||
@@ -86,8 +88,8 @@ class XexModule : public xe::cpu::Module {
|
||||
std::string name_;
|
||||
std::string path_;
|
||||
xe_xex2_ref xex_;
|
||||
xex2_header* xex_header_;
|
||||
bool loaded_; // Loaded into memory?
|
||||
std::vector<uint8_t> xex_header_mem_; // Holds the xex header
|
||||
bool loaded_; // Loaded into memory?
|
||||
|
||||
uint32_t base_address_;
|
||||
uint32_t low_address_;
|
||||
|
||||
Reference in New Issue
Block a user