System: Fix saving of subimage index

This commit is contained in:
Stenzek 2024-10-06 18:06:51 +10:00
parent c9f7ef5f9a
commit 3fb5fb4c72
No known key found for this signature in database
1 changed files with 1 additions and 0 deletions

View File

@ -3116,6 +3116,7 @@ bool System::SaveStateBufferToFile(const SaveStateBuffer& buffer, std::FILE* fp,
DebugAssert(FileSystem::FTell64(fp) == static_cast<s64>(file_position));
header.media_path_length = static_cast<u32>(buffer.media_path.length());
header.offset_to_media_path = file_position;
header.media_subimage_index = buffer.media_subimage_index;
if (std::fwrite(buffer.media_path.data(), buffer.media_path.length(), 1, fp) != 1)
{
Error::SetErrno(error, "fwrite() for media path failed: ", errno);