From c6c22a03fdd3de88e67299d8917229c1affcb9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 28 Oct 2018 16:48:46 +0100 Subject: [PATCH] Address feedback, thanks! --- GPU/Common/FramebufferCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Common/FramebufferCommon.cpp b/GPU/Common/FramebufferCommon.cpp index 30aea79d9f..d0ae91c2d0 100644 --- a/GPU/Common/FramebufferCommon.cpp +++ b/GPU/Common/FramebufferCommon.cpp @@ -2064,8 +2064,8 @@ void FramebufferManagerCommon::PackFramebufferSync_(VirtualFramebuffer *vfb, int const int dstByteOffset = (y * vfb->fb_stride + x) * dstBpp; - if (!Memory::IsValidRange(fb_address + dstByteOffset, (h * vfb->fb_stride + w) * dstBpp)) { - ERROR_LOG(G3D, "PackFramebufferSync_ would read outside of memory, ignoring"); + if (!Memory::IsValidRange(fb_address + dstByteOffset, ((h - 1) * vfb->fb_stride + w) * dstBpp)) { + ERROR_LOG(G3D, "PackFramebufferSync_ would write outside of memory, ignoring"); return; }