Skip to content

Commit

Permalink
fix: use new 'Protection' constants
Browse files Browse the repository at this point in the history
  • Loading branch information
darfink committed May 28, 2020
1 parent eb49d95 commit e6fa25f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arch/detour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Detour {
region::protect_with_handle(
area.as_ptr(),
area.len(),
region::Protection::ReadWriteExecute,
region::Protection::READ_WRITE_EXECUTE,
)
}?;

Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ pub fn is_executable_address(address: *const ()) -> Result<bool> {
Ok(
region::query(address as *const _)?
.protection
.contains(region::Protection::Execute),
.contains(region::Protection::EXECUTE),
)
}

0 comments on commit e6fa25f

Please sign in to comment.