summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCharles Blake <cblake@csail.mit.edu>2015-07-26 09:17:04 -0400
committerCharles Blake <cblake@csail.mit.edu>2015-07-26 09:17:04 -0400
commita2b6a630feaf7e6165feeb44281a8f9526f5b2a3 (patch)
tree246f614ea3339c0b0e0bde85964cc2b24946b2b5
parent18df5dad113c24696c3cae45ffdfe663f7d7b4ef (diff)
downloadNim-a2b6a630feaf7e6165feeb44281a8f9526f5b2a3.tar.gz
Oops..[]= not defined yet here. Use .data instead.
-rw-r--r--lib/system/sysstr.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim
index e4673b169..9c98f8416 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))