Skip to content

Commit

Permalink
Correctly protect that stride
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Apr 11, 2016
1 parent 9f19195 commit 9bb5820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Charts/Classes/Renderers/ChartYAxisRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public class ChartYAxisRenderer: ChartAxisRendererBase
let last = interval == 0.0 ? 0.0 : ChartUtils.nextUp(floor(Double(yMax) / interval) * interval)

var n = 0
if last != first
if interval != 0.0
{
for _ in first.stride(through: last, by: interval)
{
Expand Down Expand Up @@ -504,4 +504,4 @@ public class ChartYAxisRenderer: ChartAxisRendererBase

CGContextRestoreGState(context)
}
}
}

0 comments on commit 9bb5820

Please sign in to comment.