CoolLine (classic updated)

CoolLine (classic updated)

67.2k Downloads

typo in core.lua

Road-block opened this issue · 4 comments

commented

core.lua#L620

bookType ▶️ btype

commented

Thanks for reporting this.

I could not spot it since I mainly use Classic with only 1 character.

  • Can you tell if it is retail and/or classic ?
  • Do you have any more info on what was your error (bugsack/swatter report ?)

I opened a fix branch #5

commented

Classic.
There is no Lua error, it's a logic bug because bookType is an unintended global read.
It will be nil unless some other addon is leaking a variable with that name.

The result is that bookType == BOOKTYPE_SPELL will always be false regardless what the btype (which is the intended variable) is.

commented

well, thats sounds like a old coding typo (https://github.com/LoneWanderer-GH/CoolLine/blame/0104dc9cb40796fe2c38d19666fdfbf0c06dd50c/core.lua#L620) this means the code is maybe not even reachable, or a feature is broken but unseen...

Di you ran a (lua) code checker by any chance ?

commented

Typo fix delivered and released (see #5 )