diff --git a/desmume/src/GPU.cpp b/desmume/src/GPU.cpp index 5db3656d4..fc9aef630 100644 --- a/desmume/src/GPU.cpp +++ b/desmume/src/GPU.cpp @@ -3062,7 +3062,7 @@ void GPUEngineBase::_RenderLine_BGExtended(GPUEngineCompositorInfo &compInfo, co { const size_t vramPixel = (size_t)((u8 *)MMU_gpu_map(compInfo.renderState.selectedBGLayer->BMPAddress) - MMU.ARM9_LCD) / sizeof(u16); - if (vramPixel > (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_VRAM_BLOCK_LINES * 4)) + if (vramPixel >= (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_VRAM_BLOCK_LINES * 4)) { outUseCustomVRAM = false; }