From 903ce3d54f02c070a41dd04299a13ddcb807c9f4 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 15 Oct 2013 01:25:38 +0000 Subject: [PATCH] Clamp infinite time values to one hour when displayed on an icon. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1053 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleIcone.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OvaleIcone.lua b/OvaleIcone.lua index a1960c7..411054b 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -32,8 +32,11 @@ local function SetValue(self, value, actionTexture) self.aPortee:Hide() self.shortcut:Hide() if value then - if value<10 then + if value < 10 then self.remains:SetFormattedText("%.1f", value) + elseif value == math.huge then + -- Clamp infinite time values to 3600 (one hour) + self.remains:SetFormattedText("3600") else self.remains:SetFormattedText("%d", value) end -- 1.7.9.5