Merge pull request #825 from CookiePLMonster/savestate-ui-fixes

Seek before reading save state screenshot
This commit is contained in:
Connor McLaughlin 2020-09-06 17:26:16 +10:00 committed by GitHub
commit 6c8ea294a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -1820,6 +1820,7 @@ CommonHostInterface::GetExtendedSaveStateInfo(const char* game_code, s32 slot)
if (header.screenshot_width > 0 && header.screenshot_height > 0 && header.screenshot_size > 0 &&
(static_cast<u64>(header.offset_to_screenshot) + static_cast<u64>(header.screenshot_size)) <= stream->GetSize())
{
stream->SeekAbsolute(header.offset_to_screenshot);
ssi.screenshot_data.resize((header.screenshot_size + 3u) / 4u);
if (stream->Read2(ssi.screenshot_data.data(), header.screenshot_size))
{