From 0a01f5b655db57e9ec6484b1bd9080c251e5769a Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 9 Apr 2019 11:21:35 +0200 Subject: strs.nim: fixed a silly typo --- lib/core/strs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/core') diff --git a/lib/core/strs.nim b/lib/core/strs.nim index ccc261d95..f02757070 100644 --- a/lib/core/strs.nim +++ b/lib/core/strs.nim @@ -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) -- cgit 1.4.1-2-gfad0