Fix for cstring nil to string nil conversion with $
This commit is contained in:
parent
f18ff6a033
commit
cc4bb89267
1 changed files with 2 additions and 1 deletions
|
|
@ -85,7 +85,8 @@ proc toNimStr(str: cstring, len: int): NimString {.compilerProc.} =
|
|||
copyMem(addr(result.data), str, len + 1)
|
||||
|
||||
proc cstrToNimstr(str: cstring): NimString {.compilerRtl.} =
|
||||
result = toNimStr(str, str.len)
|
||||
if str == nil: NimString(nil)
|
||||
else: toNimStr(str, str.len)
|
||||
|
||||
proc copyString(src: NimString): NimString {.compilerRtl.} =
|
||||
if src != nil:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue