mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-28 05:45:14 +00:00
Oops..[]= not defined yet here. Use .data instead.
This commit is contained in:
@@ -83,7 +83,7 @@ proc toNimStr(str: cstring, len: int): NimString {.compilerProc.} =
|
||||
result = rawNewStringNoInit(len)
|
||||
result.len = len
|
||||
c_memcpy(result.data, str, len)
|
||||
result[result.len] = '\0'
|
||||
result.data[len] = '\0'
|
||||
|
||||
proc cstrToNimstr(str: cstring): NimString {.compilerRtl.} =
|
||||
result = toNimStr(str, c_strlen(str))
|
||||
|
||||
Reference in New Issue
Block a user