mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
Remove warning of -Wstringop-truncation
Fix the right length when strncpy. And use specific version of copy to copy GameID.
This commit is contained in:
parent
62707986b7
commit
7885fdb1ae
3 changed files with 5 additions and 5 deletions
|
@ -341,8 +341,8 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args)
|
|||
}
|
||||
|
||||
// Setting up the header
|
||||
StateHeader header;
|
||||
strncpy(header.gameID, SConfig::GetInstance().GetGameID().c_str(), 6);
|
||||
StateHeader header{};
|
||||
SConfig::GetInstance().GetGameID().copy(header.gameID, std::size(header.gameID));
|
||||
header.size = g_use_compression ? (u32)buffer_size : 0;
|
||||
header.time = Common::Timer::GetDoubleTime();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue