Lua Error when targetting webwrapped players in heroic alpha/beta titan rune dungeons
sir-galahad opened this issue ยท 2 comments
Version: v1.14.24
I am occasionally getting this error in AN/OK when i attempt to target a web wrapped player:
i believe i've tracked the problem down to line 1456 in TargetInfo.lua that has this code:
buffData[aura][i] = nil
I this is the only place i can see where a nil value is put into a position to be passed into BuffExpirationSort
while setting the value to nil leaves a hole in the array that still causes a nil value to be passed into a sort function you can see this in game with this macro:
/run function testsort(a,b) print( a," <> ",b) return false end
/run a={10,20,30,40,50}
/run a[2]=nil
/run table.sort(a,testsort)
as such i believe using
table.remove(buffData[aura],i)
would solve the issue that i'm seeing i'm giving it a try locally and will make a pull request if i don't have this problem the next time i run heroic+(+) AN/OK
Thanks for the detailed rundown! I'd appreciate a PR and will be happy to merge it.
Closed by #36