Skip to content

Commit

Permalink
Adjust health calculation to prevent division by zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Apr 29, 2024
1 parent 261c293 commit 87a9ece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/oUF.lua
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ local function SUIHealth(unit, _, ...)
local currentVal = UnitHealth(unit) or 0
local maxVal = UnitHealthMax(unit) or currentVal
local isDead = UnitIsDeadOrGhost(unit)

if maxVal == 0 then maxVal = 1 end
return calculateResult(currentVal, maxVal, isDead, ...)
end

Expand Down

0 comments on commit 87a9ece

Please sign in to comment.