mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
fix: below or equal in var_int encoding
This commit is contained in:
parent
4038c0273f
commit
faa002f53c
1 changed files with 2 additions and 2 deletions
|
@ -31,9 +31,9 @@ def int_to_hex(i, length=1):
|
|||
def var_int(i):
|
||||
if i<0xfd:
|
||||
return int_to_hex(i)
|
||||
elif i<0xffff:
|
||||
elif i<=0xffff:
|
||||
return "fd"+int_to_hex(i,2)
|
||||
elif i<0xffffffff:
|
||||
elif i<=0xffffffff:
|
||||
return "fe"+int_to_hex(i,4)
|
||||
else:
|
||||
return "ff"+int_to_hex(i,8)
|
||||
|
|
Loading…
Add table
Reference in a new issue