Skip to content

Commit

Permalink
Fix error when checker list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds authored and Stanzilla committed Nov 17, 2023
1 parent ea6a31c commit 9dd371d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LibRangeCheck-3.0/LibRangeCheck-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,9 @@ local function getRangeWithCheckerList(unit, checkerList)
hi = mid - 1
end
end
if lo > #checkerList then
if #checkerList == 0 then
return nil, nil
elseif lo > #checkerList then
return 0, checkerList[#checkerList].range
elseif lo <= 1 then
return checkerList[1].range, nil
Expand Down

0 comments on commit 9dd371d

Please sign in to comment.