mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-02 21:47:18 +00:00
Utils: Rename uint64ToByteArrayLE() helper to int64ToByteArrayLE(), as the implementation is actually signed.
This commit is contained in:
@@ -92,7 +92,7 @@ public class Utils {
|
||||
out[offset + 3] = (byte) (0xFF & (val >> 24));
|
||||
}
|
||||
|
||||
public static void uint64ToByteArrayLE(long val, byte[] out, int offset) {
|
||||
public static void int64ToByteArrayLE(long val, byte[] out, int offset) {
|
||||
out[offset] = (byte) (0xFF & val);
|
||||
out[offset + 1] = (byte) (0xFF & (val >> 8));
|
||||
out[offset + 2] = (byte) (0xFF & (val >> 16));
|
||||
|
||||
@@ -105,7 +105,7 @@ public class VarInt {
|
||||
default:
|
||||
bytes = new byte[9];
|
||||
bytes[0] = (byte) 255;
|
||||
Utils.uint64ToByteArrayLE(value, bytes, 1);
|
||||
Utils.int64ToByteArrayLE(value, bytes, 1);
|
||||
return bytes;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user