From 2e382267d4e4d334906940b56fa46be94db71fe3 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Tue, 15 Aug 2017 22:38:48 +0200 Subject: [PATCH] Overlappinginterfals - find first element --- .../info/nightscout/androidaps/data/OverlappingIntervals.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java b/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java index 608fa8d328..36b06bb7e2 100644 --- a/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java +++ b/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java @@ -31,7 +31,7 @@ public class OverlappingIntervals extends Intervals { @Nullable public synchronized T getValueByInterval(long time) { - for (int index = rawData.size()-1; index > 0; index--) { //begin with newest + for (int index = rawData.size()-1; index >= 0; index--) { //begin with newest T cur = rawData.valueAt(index); if (cur.match(time)){ return cur;