From f7a5a173f742cf583d664a409685210934584c41 Mon Sep 17 00:00:00 2001
From: cybermind <iddqd_mail@mail.ru>
Date: Sun, 5 May 2013 11:45:42 +0600
Subject: [PATCH] [-] Fixed life bar drawing bug for extremly low values

---
 src/ui/mainscr.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ui/mainscr.cpp b/src/ui/mainscr.cpp
index 1247e3947..dc2713200 100644
--- a/src/ui/mainscr.cpp
+++ b/src/ui/mainscr.cpp
@@ -153,7 +153,7 @@ static void UiDrawLifeBar(const CUnit &unit, int x, int y)
 		}
 
 		f = (f * (unit.Type->Icon.Icon->G->Width)) / 100;
-		Video.FillRectangleClip(color, x + 1, y + 1, f - 2, 5);
+		Video.FillRectangleClip(color, x + 1, y + 1, f > 1 ? f - 2 : 0, 5);
 	}
 }