More quick fixes
This commit is contained in:
parent
08e5b021de
commit
55941eaf7e
@ -93,7 +93,7 @@ namespace detail {
|
||||
}
|
||||
Segment_Command segment = load_bytes<Segment_Command>(obj_file, actual_offset);
|
||||
if(should_swap) {
|
||||
swap_segment_command(&segment, NX_UnknownByteOrder);
|
||||
swap_segment_command(segment);
|
||||
}
|
||||
if(strcmp(segment.segname, "__TEXT") == 0) {
|
||||
return segment.vmaddr;
|
||||
|
||||
@ -32,7 +32,7 @@ namespace detail {
|
||||
// Endianness should always be little for dos and pe headers
|
||||
FILE* file_ptr;
|
||||
errno_t ret = fopen_s(&file_ptr, obj_path.c_str(), "rb");
|
||||
auto file = raii_wrap(file_ptr, file_deleter);
|
||||
auto file = raii_wrap(std::move(file_ptr), file_deleter);
|
||||
if(ret != 0 || file == nullptr) {
|
||||
throw file_error("Unable to read object file " + obj_path);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user