Quantcast

Make sure we don't try to divide by zero

Adrian L Lange [09-22-14 - 13:15]
Make sure we don't try to divide by zero
Filename
oUF_P3lim.lua
diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua
index 036049d..b89ee82 100644
--- a/oUF_P3lim.lua
+++ b/oUF_P3lim.lua
@@ -26,7 +26,7 @@ local function PostUpdateHealth(element, unit, cur, max)
 	local ScrollFrame = element.__owner.Portrait.scrollFrame

 	if(element.disconnected) then
-		cur = 0
+		cur, max = 0, 1
 	end

 	local offset = -(230 * (1 - cur / max))