newruntime: fixes another bug

This commit is contained in:
Araq 2019-04-10 13:53:47 +02:00
commit a34ce2714a
5 changed files with 247 additions and 4 deletions

View file

@ -171,8 +171,7 @@ proc setLengthStrV2(s: var NimStringV2, newLen: int) {.compilerRtl.} =
s.len = newLen
proc nimAsgnStrV2(a: var NimStringV2, b: NimStringV2) {.compilerRtl.} =
# self assignment is fine!
#if unlikely(a.p == b.p): return
if a.p == b.p: return
if isLiteral(b):
# we can shallow copy literals:
frees(a)