strs.nim: fixed a silly typo
This commit is contained in:
parent
f44e1e2214
commit
0a01f5b655
1 changed files with 1 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ proc toNimStr(str: cstring, len: int): NimStringV2 {.compilerProc.} =
|
|||
if len > 0:
|
||||
# we are about to append, so there is no need to copy the \0 terminator:
|
||||
copyMem(unsafeAddr p.data[0], str, len)
|
||||
result = NimStringV2(len: 0, p: p)
|
||||
result = NimStringV2(len: len, p: p)
|
||||
|
||||
proc cstrToNimstr(str: cstring): NimStringV2 {.compilerRtl.} =
|
||||
if str == nil: toNimStr(str, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue