diff --git a/src/video/vid_ega_render.c b/src/video/vid_ega_render.c index 5e6337a48..0ab9b5b3f 100644 --- a/src/video/vid_ega_render.c +++ b/src/video/vid_ega_render.c @@ -76,6 +76,9 @@ ega_render_overscan_left(ega_t *ega) { int i; + if ((ega->displine + ega->y_add) < 0) + return; + if (ega->scrblank || (ega->hdisp == 0)) return; @@ -89,6 +92,9 @@ ega_render_overscan_right(ega_t *ega) { int i, right; + if ((ega->displine + ega->y_add) < 0) + return; + if (ega->scrblank || (ega->hdisp == 0)) return; diff --git a/src/video/vid_svga_render.c b/src/video/vid_svga_render.c index 30b274067..c76bf2d72 100644 --- a/src/video/vid_svga_render.c +++ b/src/video/vid_svga_render.c @@ -69,6 +69,9 @@ svga_render_overscan_left(svga_t *svga) { int i; + if ((svga->displine + svga->y_add) < 0) + return; + if (svga->scrblank || (svga->hdisp == 0)) return; @@ -82,6 +85,9 @@ svga_render_overscan_right(svga_t *svga) { int i, right; + if ((svga->displine + svga->y_add) < 0) + return; + if (svga->scrblank || (svga->hdisp == 0)) return;