mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
last arg of copyOfRange() is index, not length!
This commit is contained in:
+2
-4
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user