From c87d8483752e1f2d2f2dad484ec45c00204a7d68 Mon Sep 17 00:00:00 2001 From: ooba Date: Mon, 25 Feb 2019 19:03:17 +0900 Subject: [PATCH] #3857 Defer the update of value be done after returning the current value. --- .../Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift b/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift index 9ae8651a22..20024efbc4 100644 --- a/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift +++ b/Source/Charts/Renderers/BarLineScatterCandleBubbleRenderer.swift @@ -111,8 +111,8 @@ extension BarLineScatterCandleBubbleRenderer.XBounds: Sequence { } public mutating func next() -> Int? { + defer { value += 1 } guard value < bounds.max else { return nil } - value += 1 return value } }