From f82145d9ddbd4dd93feb6fa744c9cbe564e9b472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Fri, 20 Nov 2020 19:41:23 +0100 Subject: [PATCH] EXI_DeviceMemoryCard: Use std::array --- Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp | 2 +- Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp index 0262d8aa7c..f00e6c486e 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp @@ -121,7 +121,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gci_folder, m_command = Command::NintendoID; m_status = MC_STATUS_BUSY | MC_STATUS_UNLOCKED | MC_STATUS_READY; m_position = 0; - memset(m_programming_buffer, 0, sizeof(m_programming_buffer)); + m_programming_buffer.fill(0); // Nintendo Memory Card EXI IDs // 0x00000004 Memory Card 59 4Mbit // 0x00000008 Memory Card 123 8Mb diff --git a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.h b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.h index 35a22557b6..b072e252ad 100644 --- a/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.h +++ b/Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include #include @@ -99,7 +100,7 @@ private: Command m_command; int m_status; u32 m_position; - u8 m_programming_buffer[128]; + std::array m_programming_buffer; //! memory card parameters unsigned int m_card_id; unsigned int m_address;