mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 01:21:56 +01:00
fix hexdump() when using an offset with -1 as length (= full length)
This commit is contained in:
parent
0d27245dd1
commit
a4a59f5df4
@ -126,7 +126,7 @@ public class GB {
|
|||||||
|
|
||||||
public static String hexdump(byte[] buffer, int offset, int length) {
|
public static String hexdump(byte[] buffer, int offset, int length) {
|
||||||
if (length == -1) {
|
if (length == -1) {
|
||||||
length = buffer.length;
|
length = buffer.length - offset;
|
||||||
}
|
}
|
||||||
final char[] hexArray = "0123456789ABCDEF".toCharArray();
|
final char[] hexArray = "0123456789ABCDEF".toCharArray();
|
||||||
char[] hexChars = new char[length * 2];
|
char[] hexChars = new char[length * 2];
|
||||||
|
Loading…
Reference in New Issue
Block a user