From 2cf9bf6e932e36731ddb7b11fb603d81a6f4e240 Mon Sep 17 00:00:00 2001 From: ackis Date: Sun, 1 Mar 2009 07:48:24 +0000 Subject: [PATCH] Fix a stupid bug where when I didn't scan First Aid and cycled through it, it would say -2/-2 for recipes --- ARLFrame.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ARLFrame.lua b/ARLFrame.lua index 5096885..869d7ed 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -1216,10 +1216,12 @@ local function SetProgressBar(playerData) ARL_ProgressBar:SetMinMaxValues(0, pbMax) ARL_ProgressBar:SetValue(pbCur) - - if math.floor(pbCur / pbMax * 100) < 101 then + + if (math.floor(pbCur / pbMax * 100) < 101) and (pbCur >= 0) and (pbMax >= 0) then ARL_ProgressBarText:SetText(pbCur .. " / " .. pbMax .. " - " .. math.floor(pbCur / pbMax * 100) .. "%") else + pbCur = 0 + pbMax = 0 ARL_ProgressBarText:SetText(pbCur .. " / " .. pbMax .. " - " .. L["NOT_YET_SCANNED"]) end -- 1.7.9.5