Skip to content

Commit 730294e

Browse files
committed
Fixed a potential secret error (fixes #83)
1 parent 93e75bb commit 730294e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

modules/tooltipIds.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,14 @@ function Module:AlreadyAdded(textLine, tooltip)
9191
return false
9292
end
9393

94-
for i = 1, 15 do
95-
local tooltipFrame = _G[tooltip:GetName() .. "TextLeft" .. i]
96-
local textRight = _G[tooltip:GetName() .. "TextRight" .. i]
97-
local text, right
98-
if tooltipFrame then text = tooltipFrame:GetText() end
99-
if text and string.find(text, textLine, 1, true) then return true end
100-
if textRight then right = textRight:GetText() end
101-
if right and string.find(right, textLine, 1, true) then return true end
94+
for i = 1, 30 do
95+
local leftFontstring = _G[tooltip:GetName() .. "TextLeft" .. i]
96+
local rightFontstring = _G[tooltip:GetName() .. "TextRight" .. i]
97+
local left, right
98+
if leftFontstring then left = leftFontstring:GetText() end
99+
if left and not issecretvalue(left) and string.find(left, textLine, 1, true) then return true end
100+
if rightFontstring then right = rightFontstring:GetText() end
101+
if right and not issecretvalue(right) and string.find(right, textLine, 1, true) then return true end
102102
end
103103
end
104104

0 commit comments

Comments
 (0)