mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-18 19:32:41 +00:00
FifoPlayer: Fix hang when taking screenshot during FIFO log playback
Don't copy null terminators from the log's `header.gameid` into `FifoDataFile`'s `m_game_id`. Doing so would cause an infinite loop in `Core::GenerateScreenshotName` as the various concatenations and `fmt::format` calls would then effectively drop all the timestamps and disambiguating arbitrary numbers since they followed the null terminator in the gameid, and so the `File::Exists` calls would always return true. Fixes https://bugs.dolphin-emu.org/issues/14002.
This commit is contained in:
parent
c9ea4e3b8e
commit
5c9e4f8e47
@ -274,7 +274,8 @@ std::unique_ptr<FifoDataFile> FifoDataFile::Load(const std::string& filename, bo
|
||||
}
|
||||
else
|
||||
{
|
||||
dataFile->m_game_id = std::string{header.gameid, DEFAULT_GAME_ID.size()};
|
||||
const size_t gameid_length = strnlen(header.gameid, DEFAULT_GAME_ID.size());
|
||||
dataFile->m_game_id = std::string{header.gameid, gameid_length};
|
||||
}
|
||||
|
||||
if (flagsOnly)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user