From cec89d835494bda07d7b27636a24544460574904 Mon Sep 17 00:00:00 2001 From: c-blake Date: Tue, 4 Sep 2018 09:26:34 -0400 Subject: This has been unnecessary as long as rawNewObj has called zeroMem, (#8867) and more recently indexing past the Nim-logical end has become illegal making this line cause a crash. --- lib/pure/memfiles.nim | 1 - 1 file changed, 1 deletion(-) (limited to 'lib') diff --git a/lib/pure/memfiles.nim b/lib/pure/memfiles.nim index 0249b7413..9fccd08d4 100644 --- a/lib/pure/memfiles.nim +++ b/lib/pure/memfiles.nim @@ -328,7 +328,6 @@ proc `$`*(ms: MemSlice): string {.inline.} = ## Return a Nim string built from a MemSlice. var buf = newString(ms.size) copyMem(addr(buf[0]), ms.data, ms.size) - buf[ms.size] = '\0' result = buf iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} = -- cgit 1.4.1-2-gfad0