fix reading rest (#541)

This commit is contained in:
m2049r 2019-02-28 22:07:22 +01:00 committed by GitHub
parent 0bf0444dce
commit 25c8ec1229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -173,10 +173,10 @@ public class LevinReader {
// this should be in LittleEndianDataInputStream because it has little
// endian logic
private long readRest(int firstByte, int bytes) throws IOException {
private long readRest(final int firstByte, final int bytes) throws IOException {
long result = firstByte;
for (int i = 0; i < bytes; i++) {
result = result + (in.readUnsignedByte() << 8);
for (int i = 1; i < bytes + 1; i++) {
result = result + (((long) in.readUnsignedByte()) << (8 * i));
}
return result;
}