From 5bae9d31fc660e181c8da17e54886c85b70578e4 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Thu, 5 Dec 2013 08:18:25 +0000 Subject: [PATCH] Fix global variable leakage. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1229 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleSpellBook.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 1.7.9.5