Banshee / Voodoo3: More accurate check for address wrap during update().

This commit is contained in:
Volker Ruppert 2024-06-02 14:40:46 +02:00
parent 12e78032af
commit 3bcd697be5

View File

@ -599,7 +599,7 @@ void bx_voodoo_base_c::update(void)
iHeight = s.vdraw.height;
start &= v->fbi.mask;
Bit8u *disp_ptr = &v->fbi.ram[start];
if ((start + pitch * iHeight) > (v->fbi.mask + 1)) {
if ((start + pitch * (iHeight - 1) + iWidth) > (v->fbi.mask + 1)) {
BX_ERROR(("skip address wrap during update() (start = 0x%08x)", start));
BX_UNLOCK(render_mutex);
return;