More quick fixes

This commit is contained in:
Jeremy 2023-09-19 18:57:03 -04:00
parent 5d3755353f
commit c0a15d2677
No known key found for this signature in database
GPG Key ID: 19AA8270105E8EB4
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ namespace detail {
}
static uintptr_t elf_get_module_image_base(const std::string& obj_path) {
auto file = raii_wrapper(fopen(obj_path.c_str(), "rb"), file_deleter);
auto file = raii_wrap(fopen(obj_path.c_str(), "rb"), file_deleter);
if(file == nullptr) {
throw file_error("Unable to read object file " + obj_path);
}

View File

@ -80,7 +80,7 @@ namespace detail {
return 0;
}
if(should_swap) {
swap_mach_header<Bits>(header);
swap_mach_header(header);
}
ncmds = header.ncmds;
load_commands_offset += header_size;
@ -138,7 +138,7 @@ namespace detail {
}
static uintptr_t macho_get_text_vmaddr(const std::string& obj_path) {
auto file = raii_wrapper(fopen(obj_path.c_str(), "rb"), file_deleter);
auto file = raii_wrap(fopen(obj_path.c_str(), "rb"), file_deleter);
if(file == nullptr) {
throw file_error("Unable to read object file " + obj_path);
}