fix handling of second byte
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ class DataUtilTest {
|
||||
void testHeader() {
|
||||
header(0)
|
||||
header(1)
|
||||
header(556)
|
||||
header(8 * 1024 * 1024 - 1)
|
||||
try {
|
||||
header(8 * 1024 * 1024)
|
||||
|
Reference in New Issue
Block a user