diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 839b2abeff..7df14aea06 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -185,7 +185,7 @@ void Init() ReadHeader(); std::thread md5thread(CheckMD5); md5thread.detach(); - if (strncmp((char *)tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6)) + if (strncmp(tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6)) { PanicAlertT("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, SConfig::GetInstance().GetUniqueID().c_str()); EndPlayInput(false); @@ -1205,7 +1205,7 @@ void SaveRecording(const std::string& filename) memset(&header, 0, sizeof(DTMHeader)); header.filetype[0] = 'D'; header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A; - strncpy((char *)header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); + strncpy(header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); header.bWii = SConfig::GetInstance().bWii; header.numControllers = s_numPads & (SConfig::GetInstance().bWii ? 0xFF : 0x0F); diff --git a/Source/Core/Core/Movie.h b/Source/Core/Core/Movie.h index e86b5cb8e2..c7fe7e630c 100644 --- a/Source/Core/Core/Movie.h +++ b/Source/Core/Core/Movie.h @@ -63,7 +63,7 @@ struct DTMHeader { u8 filetype[4]; // Unique Identifier (always "DTM"0x1A) - u8 gameID[6]; // The Game ID + char gameID[6]; // The Game ID bool bWii; // Wii game u8 numControllers; // The number of connected controllers (1-4) diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index c7c3110961..a83e54a2a2 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -343,7 +343,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args) // Setting up the header StateHeader header; - strncpy((char*)header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); + strncpy(header.gameID, SConfig::GetInstance().GetUniqueID().c_str(), 6); header.size = g_use_compression ? (u32)buffer_size : 0; header.time = Common::Timer::GetDoubleTime(); @@ -474,7 +474,7 @@ static void LoadFileStateData(const std::string& filename, std::vector& ret_ StateHeader header; f.ReadArray(&header, 1); - if (strncmp(SConfig::GetInstance().GetUniqueID().c_str(), (char*)header.gameID, 6)) + if (strncmp(SConfig::GetInstance().GetUniqueID().c_str(), header.gameID, 6)) { Core::DisplayMessage(StringFromFormat("State belongs to a different game (ID %.*s)", 6, header.gameID), 2000); diff --git a/Source/Core/Core/State.h b/Source/Core/Core/State.h index c16a22a299..57a2f0c647 100644 --- a/Source/Core/Core/State.h +++ b/Source/Core/Core/State.h @@ -20,7 +20,7 @@ static const u32 NUM_STATES = 10; struct StateHeader { - u8 gameID[6]; + char gameID[6]; u32 size; double time; };