From a6146fa39000e0b524ff7f2e39b8ee736937fe4b Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sat, 19 Oct 2013 17:27:18 +0000 Subject: [PATCH] Fix infinite loop introduced in r1083 when scanning pet spellbooks. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1085 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleSpellBook.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvaleSpellBook.lua b/OvaleSpellBook.lua index d89914b..d5c351f 100644 --- a/OvaleSpellBook.lua +++ b/OvaleSpellBook.lua @@ -173,7 +173,8 @@ function OvaleSpellBook:UpdatePetSpells() local i = 1 while true do local skillType, spellId = API_GetSpellBookItemInfo(i, BOOKTYPE_PET) - if spellId and skillType ~= "FUTURESPELL" and skillType ~= "FLYOUT" then + if not spellId then break end + if skillType ~= "FUTURESPELL" and skillType ~= "FLYOUT" then -- Use GetSpellLink() in case this spellbook item was replaced by another spell. local spellLink = API_GetSpellLink(i, BOOKTYPE_PET) if spellLink then -- 1.7.9.5