sanity check need in case empty string passed to lib:IsAlt(alt) #6


  • Defect
Open
  • speedwayst4r created this issue Nov 29, 2016

    recently (maybe my Prat alts list is corrupted?) function lib:ListAlts started throwing a nil operator error on line 327, caused by an alt whose value is the empty string ""

     

    2x AddOns\RosterTooltip\Libs\LibAlts-1.0\LibAlts-1.0-40.lua:327: attempt to index field '?' (a nil value)
    Locals: nil

     

    The existing sanity check traps nil assignments, but not the empty string "". Thus,

     

    if not alt then return nil end

    needs to be changed to

     

    if not alt or alt == "" then return nil end

    to resolve the issue.

  • speedwayst4r added a tag Defect Nov 29, 2016

To post a comment, please login or register a new account.