mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 23:11:36 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user