Fixed possible infinite loop in custom counters

Only try to redraw if the maximum count exceeds the numbers of frames we have to display the count. If the maximum drops below the number of frames we have to display it, that's fine because the excess frames will just be hidden.
This commit is contained in:
Parnic
2016-11-05 21:12:13 -05:00
parent f10a647590
commit d7505b73b1
2 changed files with 5 additions and 1 deletions

View File

@ -438,7 +438,7 @@ function IceCustomCount.prototype:UpdateCustomCount()
local points = IceStackCounter_GetCount(self)
local max = IceStackCounter_GetMaxCount(self)
if max ~= #self.frame.graphical then
if max > #self.frame.graphical then
self:Redraw()
return
end