div 0 check
authornemo
Sun, 12 Dec 2010 20:17:00 -0500
changeset 4514 c62e6e522849
parent 4512 c6aff8ceada0
child 4515 9b30be246742
div 0 check
hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Mon Dec 13 01:24:06 2010 +0100
+++ b/hedgewars/uTeams.pas	Sun Dec 12 20:17:00 2010 -0500
@@ -379,7 +379,7 @@
         begin
         MaxTeamHealth:= NewTeamHealthBarWidth;
         RecountAllTeamsHealth;
-        end else NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
+        end else if NewTeamHealthBarWidth > 0 then NewTeamHealthBarWidth:= (NewTeamHealthBarWidth * cTeamHealthWidth) div MaxTeamHealth
     end;
 
 RecountClanHealth(team^.Clan);