From 6ea1accdb42a1fc5a4b240490a5317eed6722f34 Mon Sep 17 00:00:00 2001 From: Brad Allred Date: Thu, 19 Apr 2018 22:23:04 -0600 Subject: [PATCH] one more try the min for this is not the min variable --- gemrb/plugins/SDLVideo/SDL12Video.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gemrb/plugins/SDLVideo/SDL12Video.cpp b/gemrb/plugins/SDLVideo/SDL12Video.cpp index 9fd0108787..03ba89e831 100644 --- a/gemrb/plugins/SDLVideo/SDL12Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL12Video.cpp @@ -423,7 +423,7 @@ void SDL12VideoDriver::DrawHLine(short x1, short y, short x2, const Color& color short max = min + screenClip.w - 1; x1 = Clamp(x1, min, max); x2 = Clamp(x2, min, max); - y = Clamp(y, screenClip.y, min + screenClip.h - 1); + y = Clamp(y, screenClip.y, screenClip.y + screenClip.h - 1); std::vector points; for (; x1 <= x2 ; x1++ ) @@ -444,7 +444,7 @@ void SDL12VideoDriver::DrawVLine(short x, short y1, short y2, const Color& color short max = min + screenClip.h - 1; y1 = Clamp(y1, min, max); y2 = Clamp(y2, min, max); - x = Clamp(x, screenClip.x, min + screenClip.w - 1); + x = Clamp(x, screenClip.x, screenClip.x + screenClip.w - 1); std::vector points; for (; y1 <= y2 ; y1++ )