1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 00:46:34 +00:00

fix typing for hazards_manager

This commit is contained in:
jugeeya 2021-04-11 20:20:46 -07:00
parent 3ba2e70b99
commit 2ddc7cd92f

View file

@ -57,7 +57,7 @@ fn get_hazard_flag_address() -> usize {
program_counter + adrp + add + 0x9
}
fn get_hazard_hook_address() -> isize {
fn get_hazard_hook_address() -> usize {
let mut state = HookState::Begin;
let mut flag_pos = 0;
for (pos, instr) in TextIter::new() {
@ -75,12 +75,12 @@ fn get_hazard_hook_address() -> isize {
}
}
flag_pos as isize
flag_pos as usize
}
// 8.1.0 Defaults
static mut HAZARD_FLAG_ADDRESS: *mut u8 = 0x04eb_bf95 as *mut u8;
static mut LOAD_ADDRESS: isize = 0x0214_bde8;
static mut LOAD_ADDRESS: usize = 0x0214_bde8;
#[hook(offset = LOAD_ADDRESS, inline)]
fn hazard_intercept(ctx: &skyline::hooks::InlineCtx) {