From a2b6a630feaf7e6165feeb44281a8f9526f5b2a3 Mon Sep 17 00:00:00 2001 From: Charles Blake Date: Sun, 26 Jul 2015 09:17:04 -0400 Subject: [PATCH] Oops..[]= not defined yet here. Use .data instead. --- lib/system/sysstr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index e4673b169e..9c98f84166 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -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))