Quantcast

-de evil divide by zero! Must check for it!

Xruptor [01-17-11 - 16:34]
-de evil divide by zero!  Must check for it!
Filename
XanDebuffTimers.lua
diff --git a/XanDebuffTimers.lua b/XanDebuffTimers.lua
index d4e4dff..3a59470 100644
--- a/XanDebuffTimers.lua
+++ b/XanDebuffTimers.lua
@@ -323,7 +323,8 @@ function f:ProcessDebuffs(sT, sdTimer)
 	for i=1, MAX_TIMERS do
 		local name, _, icon, count, _, duration, expTime, unitCaster, _, _, spellId = UnitAura(sT, i, 'HARMFUL|PLAYER')
 		--UnitIsUnit is used JUST IN CASE (you never know lol)
-		if name and unitCaster and UnitIsUnit(unitCaster, "player") then
+		--check for duration > 0 for the evil DIVIDE BY ZERO
+		if name and unitCaster and UnitIsUnit(unitCaster, "player") and duration > 0 then
 			sdTimer[i].id = sT
 			sdTimer[i].spellName = name
 			sdTimer[i].spellId = spellId