Fix a potential divide by zero.

This commit is contained in:
Unknown W. Brackets 2015-01-19 08:43:43 -08:00
parent 0d6c002cb0
commit 05feac3eb0

View File

@ -611,7 +611,7 @@ void FramebufferManagerCommon::FindTransferFramebuffers(VirtualFramebuffer *&dst
}
if (match) {
srcYOffset = yOffset;
srcXOffset = (byteOffset / bpp) % srcStride;
srcXOffset = srcStride == 0 ? 0 : (byteOffset / bpp) % srcStride;
srcBuffer = vfb;
}
}