fix index

This commit is contained in:
Milos Kozak 2017-08-16 18:26:47 +02:00
parent 35db28f013
commit 7884c98f2f

View file

@ -28,7 +28,7 @@ public class DetailedBolusInfoStorage {
public static DetailedBolusInfo findDetailedBolusInfo(long bolustime) {
DetailedBolusInfo found = null;
for (int i = 0; i < store.size(); i++) {
long infoTime = store.get(0).date;
long infoTime = store.get(i).date;
log.debug("Existing info: " + new Date(infoTime).toLocaleString());
if (bolustime > infoTime - 60 * 1000 && bolustime < infoTime + 60 * 1000) {
found = store.get(i);