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