Fix global variable leakage.
Johnny C. Lam [12-05-13 - 08:18]
Fix global variable leakage.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1229 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleSpellBook.lua b/OvaleSpellBook.lua
index d5c351f..2aa0866 100644
--- a/OvaleSpellBook.lua
+++ b/OvaleSpellBook.lua
@@ -112,10 +112,9 @@ function OvaleSpellBook:UpdateTalents()
wipe(self_talent)
wipe(self_talentPoints)
- local name, selected
local i = 1
while true do
- name, _, _, _, selected, _ = API_GetTalentInfo(i)
+ local name, _, _, _, selected, _ = API_GetTalentInfo(i)
if not name then break end
self_talent[i] = name
if selected then
@@ -132,9 +131,8 @@ end
function OvaleSpellBook:UpdateGlyphs()
wipe(self_glyph)
- local enabled, glyphSpell
for i = 1, API_GetNumGlyphSockets() do
- enabled, _, _, glyphSpell, _ = API_GetGlyphSocketInfo(i)
+ local enabled, _, _, glyphSpell, _ = API_GetGlyphSocketInfo(i)
if enabled and glyphSpell then
self_glyph[glyphSpell] = API_GetSpellInfo(glyphSpell)
end