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…
Reference in New Issue