Proper fix for #18.

This commit is contained in:
cheatfate 2019-06-13 12:05:03 +03:00
parent d685147c52
commit 774f5c8232
No known key found for this signature in database
GPG Key ID: 46ADD633A7201F95
1 changed files with 4 additions and 4 deletions

View File

@ -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: