mirror of
https://github.com/m2049r/xmrwallet
synced 2025-05-17 05:11:54 +02:00
fix reading rest (#541)
This commit is contained in:
parent
0bf0444dce
commit
25c8ec1229
@ -173,10 +173,10 @@ public class LevinReader {
|
|||||||
|
|
||||||
// this should be in LittleEndianDataInputStream because it has little
|
// this should be in LittleEndianDataInputStream because it has little
|
||||||
// endian logic
|
// 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;
|
long result = firstByte;
|
||||||
for (int i = 0; i < bytes; i++) {
|
for (int i = 1; i < bytes + 1; i++) {
|
||||||
result = result + (in.readUnsignedByte() << 8);
|
result = result + (((long) in.readUnsignedByte()) << (8 * i));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user