Skip to content

Commit 1126ef1

Browse files
authored
fix: StaticArray#concat link child to incorrect parent (#2746)
1 parent 321ed3d commit 1126ef1

File tree

4 files changed

+1976
-1569
lines changed

4 files changed

+1976
-1569
lines changed

std/assembly/staticarray.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,14 @@ export class StaticArray<T> {
214214
for (let offset: usize = 0; offset < sourceSize; offset += sizeof<T>()) {
215215
let ref = load<usize>(thisStart + offset);
216216
store<usize>(outStart + offset, ref);
217-
__link(outStart, ref, true);
217+
__link(changetype<usize>(out), ref, true);
218218
}
219219
outStart += sourceSize;
220220
let otherSize = <usize>otherLen << alignof<T>();
221221
for (let offset: usize = 0; offset < otherSize; offset += sizeof<T>()) {
222222
let ref = load<usize>(otherStart + offset);
223223
store<usize>(outStart + offset, ref);
224-
__link(outStart, ref, true);
224+
__link(changetype<usize>(out), ref, true);
225225
}
226226
} else {
227227
memory.copy(outStart, thisStart, sourceSize);

0 commit comments

Comments
 (0)