Skip to content
Permalink
Browse files

GCMemcard: Use std::array for DEntry.m_unused_2.

  • Loading branch information...
AdmiralCurtiss committed Nov 18, 2018
1 parent 4175fdf commit f8488f45611f2ddce6a51f4959735fdcc82663b1
Showing with 3 additions and 3 deletions.
  1. +1 −1 Source/Core/Core/HW/GCMemcard/GCMemcard.cpp
  2. +2 −2 Source/Core/Core/HW/GCMemcard/GCMemcard.h
@@ -1076,7 +1076,7 @@ void GCMemcard::Gcs_SavConvert(DEntry& tempDEntry, int saveType, int length)
ByteSwap(&tmp[0], &tmp[1]);
memcpy(&tempDEntry.m_block_count, tmp.data(), 2);

ArrayByteSwap((tempDEntry.m_unused_2));
ByteSwap(&tempDEntry.m_unused_2[0], &tempDEntry.m_unused_2[1]);

memcpy(tmp.data(), &tempDEntry.m_comments_address, 4);
ByteSwap(&tmp[0], &tmp[1]);
@@ -220,8 +220,8 @@ struct DEntry
Common::BigEndianValue<u16>
m_first_block; // 0x36 0x02 Block no of first block of file (0 == offset 0)
Common::BigEndianValue<u16>
m_block_count; // 0x38 0x02 File-length (number of blocks in file)
u8 m_unused_2[2]; // 0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
m_block_count; // 0x38 0x02 File-length (number of blocks in file)
std::array<u8, 2> m_unused_2; // 0x3a 0x02 Reserved/unused (always 0xffff, has no effect)
Common::BigEndianValue<u32>
m_comments_address; // 0x3c 0x04 Address of the two comments within the file data
// (*3)

0 comments on commit f8488f4

Please sign in to comment.
You can’t perform that action at this time.