Minor cleanup

This commit is contained in:
Luke Street 2024-11-23 12:59:38 -07:00
parent d197b8e7c2
commit 490ae80a60
2 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ pub struct DiscHeader {
pub audio_stream_buf_size: u8,
/// Padding
_pad1: [u8; 14],
/// If this is a Wii disc, this will bPartitionKinde 0x5D1C9EA3
/// If this is a Wii disc, this will be 0x5D1C9EA3
pub wii_magic: MagicBytes,
/// If this is a GameCube disc, this will be 0xC2339F3D
pub gcn_magic: MagicBytes,
@ -126,7 +126,7 @@ pub struct PartitionHeader {
pub debug_mon_offset: U32,
/// Debug monitor load address
pub debug_load_address: U32,
/// PaddingPartitionKind
/// Padding
_pad1: [u8; 0x18],
/// Offset to main DOL (Wii: >> 2)
pub dol_offset: U32,

View File

@ -65,7 +65,7 @@ impl BlockReaderCISO {
}
// Build block map
let mut block_map = [0u16; CISO_MAP_SIZE];
let mut block_map = <[u16; CISO_MAP_SIZE]>::new_box_zeroed()?;
let mut block = 0u16;
for (presence, out) in header.block_present.iter().zip(block_map.iter_mut()) {
if *presence == 1 {
@ -92,7 +92,7 @@ impl BlockReaderCISO {
None
};
Ok(Box::new(Self { inner, header, block_map: Arc::new(block_map), nkit_header }))
Ok(Box::new(Self { inner, header, block_map: Arc::from(block_map), nkit_header }))
}
}