Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
encounter committed Nov 23, 2024
1 parent d197b8e commit 490ae80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nod/src/disc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions nod/src/io/ciso.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 }))
}
}

Expand Down

0 comments on commit 490ae80

Please sign in to comment.