Merge pull request #17028 from hrydgard/crashfix-softgpu-frameskip

Fix crash in SoftGPU when frameskipping, noticed by sum2012 in Daxter
This commit is contained in:
Unknown W. Brackets authored and GitHub committed 2023-02-28 19:17:36 -08:00
commit 0a01655f0e
1 file changed
+3
+3
View File
@@ -670,6 +670,9 @@ void SoftGPU::MarkDirty(uint32_t addr, uint32_t bytes, SoftGPUVRAMDirty value) {
uint32_t start = ((addr - PSP_GetVidMemBase()) & 0x001FFFFF) >> 10;
uint32_t end = start + ((bytes + 1023) >> 10);
if (end > sizeof(vramDirty_)) {
end = sizeof(vramDirty_);
}
if (value == SoftGPUVRAMDirty::CLEAR || value == (SoftGPUVRAMDirty::DIRTY | SoftGPUVRAMDirty::REALLY_DIRTY)) {
memset(vramDirty_ + start, (uint8_t)value, end - start);
} else {