mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-25 07:52:59 +03:00
bitcoin-utils: fix encoding of CompactSize integers
Encoding an atom as a Compact fails when a = 0: a 4-byte CompactSize is emitted.
This commit is contained in:
parent
fee929ec33
commit
d66de5b486
@ -143,6 +143,7 @@
|
||||
|= a=@
|
||||
^- hexb
|
||||
=/ l=@ (met 3 a)
|
||||
?: =(l 0) 1^a
|
||||
?: =(l 1) 1^a
|
||||
?: =(l 2) (cat:byt ~[1^0xfd (flip:byt 2^a)])
|
||||
?: (lte l 4) (cat:byt ~[1^0xfe (flip:byt 4^a)])
|
||||
|
Loading…
Reference in New Issue
Block a user