File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,7 @@ extension _ArrayBuffer {
232
232
_uninitializedCount: c, minimumCapacity: newCapacity)
233
233
let destStart = newBuffer. mutableFirstElementAddress
234
234
let destTailStart = destStart + hole. upperBound
235
+ let sourceTailStart = firstElementAddress + hole. upperBound
235
236
let beforeHole = 0 ..< hole. lowerBound
236
237
let afterHole = hole. upperBound ..< c
237
238
@@ -243,7 +244,7 @@ extension _ArrayBuffer {
243
244
count: beforeHole. count)
244
245
}
245
246
if !afterHole. isEmpty {
246
- destStart . moveInitialize ( from: destTailStart ,
247
+ destTailStart . moveInitialize ( from: sourceTailStart
247
248
count: afterHole. count)
248
249
}
249
250
_native. mutableCount = 0
Original file line number Diff line number Diff line change @@ -923,6 +923,7 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
923
923
_uninitializedCount: c, minimumCapacity: newCapacity)
924
924
let destStart = newBuffer. mutableFirstElementAddress
925
925
let destTailStart = destStart + hole. upperBound
926
+ let sourceTailStart = firstElementAddress + hole. upperBound
926
927
let beforeHole = 0 ..< hole. lowerBound
927
928
let afterHole = hole. upperBound ..< c
928
929
@@ -934,7 +935,7 @@ internal struct _ContiguousArrayBuffer<Element>: _ArrayBufferProtocol {
934
935
count: beforeHole. count)
935
936
}
936
937
if !afterHole. isEmpty {
937
- destStart . moveInitialize ( from: destTailStart ,
938
+ destTailStart . moveInitialize ( from: sourceTailStart ,
938
939
count: afterHole. count)
939
940
}
940
941
mutableCount = 0
You can’t perform that action at this time.
0 commit comments