NeuronButton:MACRO_UpdateUsableSpell error related to pet ability
veyh opened this issue ยท 1 comments
Hey fellow addon author,
I have a lot of macros like
#show Cobra Shot
/targetenemy [noexists]
/petattack [harm, nodead]
/cast Claw
/cast Bite
/cast Smack
/cast Cobra Shot
which cause an integer overflow attempting to store 3238019515
from Neuron-Buttons.lua:1345
:
alt_Name = GetSpellInfo(sIndex[spellName].spellID_Alt):lower()
So I changed it to
local status, err = pcall(function ()
alt_Name = GetSpellInfo(sIndex[spellName].spellID_Alt):lower()
end)
if not status then
print("NEURON ERROR", err)
print(spellName)
end
Which prints out the spell name, claw
.
I'm not sure if this bug has any impact on functionality, I just figured I'd let you know it exists.
I just made a pull request with a fix: #152