Utils: Rename uint64ToByteArrayLE() helper to int64ToByteArrayLE(), as the implementation is actually signed.

This commit is contained in:
Andreas Schildbach 2018-02-22 12:20:51 +01:00
parent 90636275af
commit 76c4f03d63
2 changed files with 2 additions and 2 deletions

View file

@ -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));

View file

@ -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;
}
}