mirror of
https://github.com/codex-storage/nim-libp2p.git
synced 2025-01-12 03:54:06 +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)
|
result.setLen(5)
|
||||||
else:
|
else:
|
||||||
result.setLen(10)
|
result.setLen(10)
|
||||||
when type(value) is SomeSVarint:
|
when type(value) is PBSomeSVarint:
|
||||||
let res = putSVarint(result, outsize, value)
|
let res = putSVarint(result, outsize, value)
|
||||||
else:
|
else:
|
||||||
let res = putUVarint(result, outsize, value)
|
let res = PB.putUVarint(result, outsize, value)
|
||||||
if res == VarintStatus.Success:
|
if res == VarintStatus.Success:
|
||||||
result.setLen(outsize)
|
result.setLen(outsize)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user