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.
This commit is contained in:
parent
d2eea9e1c9
commit
cec89d8354
1 changed files with 0 additions and 1 deletions
|
|
@ -328,7 +328,6 @@ proc `$`*(ms: MemSlice): string {.inline.} =
|
||||||
## Return a Nim string built from a MemSlice.
|
## Return a Nim string built from a MemSlice.
|
||||||
var buf = newString(ms.size)
|
var buf = newString(ms.size)
|
||||||
copyMem(addr(buf[0]), ms.data, ms.size)
|
copyMem(addr(buf[0]), ms.data, ms.size)
|
||||||
buf[ms.size] = '\0'
|
|
||||||
result = buf
|
result = buf
|
||||||
|
|
||||||
iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} =
|
iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue