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

@ -1,3 +1,7 @@
v1.10.12:
- Tweaked a few Druid CCs in the CC modules. If you've got a more up-to-date list of any of the CCs, please send them along to icehud@parnic.com
- Hopefully fixed a problem that could cause a custom counter to loop forever and cause framerate problems. (ticket #230)
v1.10.11:
- Updated TOC for IceHUD_Options module
- Fixed custom stack counters in graphical mode tracking spell charges failing to update when the maximum number of charges changes (such as with a talented 2-charge Demon Hunter Throw Glaive)

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