diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp index e2187c72b9..77f73a1224 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp @@ -1420,6 +1420,16 @@ s32 GCMemcard::PSO_MakeSaveGameValid(const Header& cardheader, const DEntry& dir return 1; } +GCMBlock::GCMBlock() +{ + Erase(); +} + +void GCMBlock::Erase() +{ + memset(m_block.data(), 0xFF, m_block.size()); +} + Header::Header(int slot, u16 size_mbits, bool shift_jis) { // Nintendo format algorithm. diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.h b/Source/Core/Core/HW/GCMemcard/GCMemcard.h index 30ef094ddf..bc32974e3e 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.h @@ -92,8 +92,8 @@ protected: struct GCMBlock { - GCMBlock() { Erase(); } - void Erase() { memset(m_block.data(), 0xFF, m_block.size()); } + GCMBlock(); + void Erase(); std::array m_block; };