fix handling of second byte

This commit is contained in:
Zlatin Balevsky
2018-07-27 15:58:13 +01:00
parent 736a4a7424
commit a76d055771
2 changed files with 2 additions and 1 deletions

View File

@@ -33,7 +33,7 @@ class DataUtil {
throw new IllegalArgumentException("header length $header.length")
return (((int)(header[0] & 0x7F)) << 16) |
((int)(header[1] & 0xFF << 8)) |
(((int)(header[1] & 0xFF) << 8)) |
((int)header[2] & 0xFF)
}
}

View File

@@ -37,6 +37,7 @@ class DataUtilTest {
void testHeader() {
header(0)
header(1)
header(556)
header(8 * 1024 * 1024 - 1)
try {
header(8 * 1024 * 1024)