fixes more nil string bugs
This commit is contained in:
parent
b07d1f1dc3
commit
babd31360a
3 changed files with 10 additions and 8 deletions
|
|
@ -110,6 +110,7 @@ proc nimToCStringConv(s: NimString): cstring {.compilerProc, inline.} =
|
|||
else: result = cstring(addr s.data)
|
||||
|
||||
proc copyStr(s: NimString, start: int): NimString {.compilerProc.} =
|
||||
if s == nil: return nil
|
||||
result = copyStrLast(s, start, s.len-1)
|
||||
|
||||
proc toNimStr(str: cstring, len: int): NimString {.compilerProc.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue