diff options
author | metagn <metagngn@gmail.com> | 2024-09-08 21:17:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-08 20:17:26 +0200 |
commit | cd22560af5f13a7c024b97e2f3de2b1fe2439eb3 (patch) | |
tree | f9a0fe8a50c34a1d39711908b772b828e22731b4 /lib | |
parent | 7cd17772181a8577a79ee166f4dc96b396dd59d2 (diff) | |
download | Nim-cd22560af5f13a7c024b97e2f3de2b1fe2439eb3.tar.gz |
fix string literal assignment with different lengths on ARC (#24083)
fixes #24080
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/strs_v2.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/system/strs_v2.nim b/lib/system/strs_v2.nim index dbee10777..404b4f78d 100644 --- a/lib/system/strs_v2.nim +++ b/lib/system/strs_v2.nim @@ -166,7 +166,7 @@ proc setLengthStrV2(s: var NimStringV2, newLen: int) {.compilerRtl.} = s.len = newLen proc nimAsgnStrV2(a: var NimStringV2, b: NimStringV2) {.compilerRtl.} = - if a.p == b.p: return + if a.p == b.p and a.len == b.len: return if isLiteral(b): # we can shallow copy literals: frees(a) |