mirror of
https://github.com/vacp2p/nim-libp2p.git
synced 2025-01-28 01:15:32 +00:00
Proper fix for #18.
This commit is contained in:
parent
d685147c52
commit
774f5c8232
@ -214,10 +214,10 @@ proc encodeVarint*(vtype: typedesc[PB],
|
||||
result.setLen(5)
|
||||
else:
|
||||
result.setLen(10)
|
||||
when type(value) is SomeSVarint:
|
||||
when type(value) is PBSomeSVarint:
|
||||
let res = putSVarint(result, outsize, value)
|
||||
else:
|
||||
let res = putUVarint(result, outsize, value)
|
||||
let res = PB.putUVarint(result, outsize, value)
|
||||
if res == VarintStatus.Success:
|
||||
result.setLen(outsize)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user