Skip to content

Commit

Permalink
Merge pull request ChartsOrg#2 from WaireHealth/fix/4641_chart_highli…
Browse files Browse the repository at this point in the history
…ght_fails

Fixes 4647 edge case resulting in OOB
  • Loading branch information
Lee-Waire-Health authored May 25, 2021
2 parents 787bdad + 2d00916 commit cea4068
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ open class ChartDataSet: ChartBaseDataSet
let match: (ChartDataEntry) -> Bool = { $0.x >= xValue }
let i = partitioningIndex(where: match)

guard self[i].x == xValue else { return [] }
guard i < endIndex && self[i].x == xValue else { return [] }
return self[i...].prefix(while: { $0.x == xValue })
}

Expand Down

0 comments on commit cea4068

Please sign in to comment.