From 902a0ccedf3be9a04e2ba95f261ef50f9ba603c4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 18 Jul 2016 02:15:07 -0400 Subject: [PATCH] Sram: Correct constness of SetCardFlashID parameter --- Source/Core/Core/HW/Sram.cpp | 4 ++-- Source/Core/Core/HW/Sram.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/HW/Sram.cpp b/Source/Core/Core/HW/Sram.cpp index 4c8884c43d..47b5f7ca08 100644 --- a/Source/Core/Core/HW/Sram.cpp +++ b/Source/Core/Core/HW/Sram.cpp @@ -58,9 +58,9 @@ void InitSRAM() } } -void SetCardFlashID(u8* buffer, u8 card_index) +void SetCardFlashID(const u8* buffer, u8 card_index) { - u64 rand = Common::swap64(*(u64*)&(buffer[12])); + u64 rand = Common::swap64(&buffer[12]); u8 csum = 0; for (int i = 0; i < 12; i++) { diff --git a/Source/Core/Core/HW/Sram.h b/Source/Core/Core/HW/Sram.h index eb7be1e8ae..0f5db4ea10 100644 --- a/Source/Core/Core/HW/Sram.h +++ b/Source/Core/Core/HW/Sram.h @@ -79,7 +79,7 @@ union SRAM { }; #pragma pack(pop) void InitSRAM(); -void SetCardFlashID(u8* buffer, u8 card_index); +void SetCardFlashID(const u8* buffer, u8 card_index); void FixSRAMChecksums(); extern SRAM sram_dump;