Couple more divide by zeros

This commit is contained in:
Flamanis
2024-06-08 16:52:52 -05:00
parent 6071ae3e66
commit bcf296d175
2 changed files with 2 additions and 2 deletions
@@ -148,7 +148,7 @@ local updateTargetBar = function(targetBar, index, combatObject, scrollFrame, he
textIndex = textIndex + 1
elseif (header.name == "percent") then
targetBar.percent = value / totalValue * 100 --totalValue is nil
targetBar.percent = value / math.max(totalValue, 0.001) * 100 --totalValue is nil
---@type string
local percentFormatted = string.format("%.1f", targetBar.percent) .. "%"
text:SetText(percentFormatted)