Remove extra trailing zero from oid

`$` would return a string of length 25, including the trailing null
String length changed to 24, avoiding an extra null byte in the output
This commit is contained in:
Flaviu Tamas
2014-11-02 17:05:23 -05:00
parent 590461d88a
commit 771e3db869

View File

@@ -55,7 +55,7 @@ proc oidToString*(oid: Oid, str: cstring) =
str[24] = '\0'
proc `$`*(oid: Oid): string =
result = newString(25)
result = newString(24)
oidToString(oid, result)
var