1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-13 08:54:03 +02:00

last arg of copyOfRange() is index, not length!

This commit is contained in:
cpfeiffer 2016-03-20 23:55:48 +01:00
parent f7b71c1f96
commit 275839a7f4

View File

@ -60,10 +60,8 @@ public abstract class AbstractMiFirmwareInfo {
public abstract boolean isGenerallyCompatibleWith(GBDevice device);
public
@NonNull
byte[] getFirmwareBytes() {
return Arrays.copyOfRange(wholeFirmwareBytes, getFirmwareOffset(), getFirmwareLength());
public @NonNull byte[] getFirmwareBytes() {
return Arrays.copyOfRange(wholeFirmwareBytes, getFirmwareOffset(), getFirmwareOffset() + getFirmwareLength());
}
public int getFirmwareVersionMajor() {