From 6771f5ca2095fd564189fb650b2003c9be9166f5 Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 10 Aug 2007 13:11:53 +0000 Subject: (svn r10837) -Fix [FS#1102]: DrawLine didn't bound-check the first pixel that was drawn (frosch) --- src/blitter/8bpp_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blitter/8bpp_base.cpp') diff --git a/src/blitter/8bpp_base.cpp b/src/blitter/8bpp_base.cpp index 4a2753af6..a931df624 100644 --- a/src/blitter/8bpp_base.cpp +++ b/src/blitter/8bpp_base.cpp @@ -60,7 +60,7 @@ void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int s stepx = 1; } - this->SetPixel(video, x, y, color); + if (x > 0 && y > 0 && x < screen_width && y < screen_height) this->SetPixel(video, x, y, color); if (dx > dy) { frac = dy - (dx / 2); while (x != x2) { -- cgit v1.2.3-70-g09d2