From 3d635bc68f79e7e98e3e1db7924abd8f9f990e8c Mon Sep 17 00:00:00 2001 From: mniip Date: Thu, 8 Nov 2012 14:31:28 +0400 Subject: [PATCH] More edge cases --- src/game/Brush.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/Brush.cpp b/src/game/Brush.cpp index e57a771ff..38dd809a4 100644 --- a/src/game/Brush.cpp +++ b/src/game/Brush.cpp @@ -22,7 +22,8 @@ void Brush::RenderRect(Renderer * ren, ui::Point position1, ui::Point position2) ren->xor_line(position1.X, position1.Y+height, position1.X+width, position1.Y+height); if(height>1){ ren->xor_line(position1.X+width, position1.Y+1, position1.X+width, position1.Y+height-1); - ren->xor_line(position1.X, position1.Y+1, position1.X, position1.Y+height-1); + if(width>0) + ren->xor_line(position1.X, position1.Y+1, position1.X, position1.Y+height-1); } } }