fix reading of compact size int as unsigned short when parsing psbts

This commit is contained in:
Craig Raw 2023-06-04 10:01:42 +02:00
parent 5b9b3043a6
commit d3e003f76e

View file

@ -188,7 +188,7 @@ public class PSBTEntry {
psbtByteBuffer.get(buf);
ByteBuffer byteBuffer = ByteBuffer.wrap(buf);
byteBuffer.order(ByteOrder.LITTLE_ENDIAN);
return byteBuffer.getShort();
return Short.toUnsignedInt(byteBuffer.getShort());
}
case (byte) 0xfe: {
byte[] buf = new byte[4];