Mask top 5 bits of PC for symbols
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user