diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/ActivityDetailsParser.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/ActivityDetailsParser.java index 76bc40c4d..65b27d2aa 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/ActivityDetailsParser.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/huami/amazfitbip/ActivityDetailsParser.java @@ -91,8 +91,8 @@ public class ActivityDetailsParser { i++; } - byte type = bytes[i++]; - int timeOffset = BLETypeConversions.toUnsigned(bytes[i++]); + byte type = bytes[i++]; // lgtm [java/index-out-of-bounds]] + int timeOffset = BLETypeConversions.toUnsigned(bytes[i++]); // lgtm [java/index-out-of-bounds] // handle timeOffset overflows (1 byte, always increasing, relative to base) if (lastTimeOffset <= timeOffset) { timeOffset = timeOffset - lastTimeOffset;