mirror of
https://gitea.invidious.io/iv-org/protodec.git
synced 2024-08-15 00:43:18 +00:00
Fix overflow in VarLong
This commit is contained in:
parent
496a5f34a9
commit
174a36f4ad
1 changed files with 2 additions and 2 deletions
|
@ -51,10 +51,10 @@ struct VarLong
|
|||
|
||||
def self.to_io(io : IO, value : Int64)
|
||||
io.write_byte 0x00 if value == 0x00
|
||||
value = value.to_u64
|
||||
value = value.to_u64!
|
||||
|
||||
while value != 0
|
||||
byte = (value & 0x7f).to_u8
|
||||
byte = (value & 0x7f).to_u8!
|
||||
value >>= 7
|
||||
|
||||
if value != 0
|
||||
|
|
Loading…
Reference in a new issue