fix hexdump() when using an offset with -1 as length (= full length)

here
Andreas Shimokawa 2015-10-04 22:42:21 +09:00
parent 0d27245dd1
commit a4a59f5df4
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ public class GB {
public static String hexdump(byte[] buffer, int offset, int length) {
if (length == -1) {
length = buffer.length;
length = buffer.length - offset;
}
final char[] hexArray = "0123456789ABCDEF".toCharArray();
char[] hexChars = new char[length * 2];