Mask top 5 bits of PC for symbols

This commit is contained in:
2025-09-06 01:29:11 -04:00
parent f7f112f7c1
commit d610e3de14
3 changed files with 11 additions and 11 deletions
+2 -4
View File
@@ -21,13 +21,11 @@ pub fn rom_from_isx(bytes: &[u8]) -> Option<Vec<u8>> {
return None;
}
let mut rom_length = 0;
let raw_rom =
unsafe { vbu_from_isx(bytes.as_ptr().cast(), bytes.len(), &mut rom_length) };
let raw_rom = unsafe { vbu_from_isx(bytes.as_ptr().cast(), bytes.len(), &mut rom_length) };
if raw_rom.is_null() {
return None;
}
// SAFETY: the rom was allocated by vbu_realloc_shim, which created it from a Vec<u8>.
let rom =
unsafe { Vec::from_raw_parts(raw_rom.cast(), rom_length, rom_length) };
let rom = unsafe { Vec::from_raw_parts(raw_rom.cast(), rom_length, rom_length) };
Some(rom)
}