Commit 33b75d2
committed
Fix array.init_elem to use source offset when reading segment data
The interpreter's visitArrayInitElem was ignoring the source offset
parameter when reading from the element segment. It used seg->data[i]
instead of seg->data[offsetVal + i], meaning it always read from the
beginning of the segment regardless of the specified offset.
The offset was already correctly computed and used in the bounds check,
but not in the actual data access loop. This is now consistent with how
visitArrayInitData handles its offset parameter.1 parent fd5e86e commit 33b75d2
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4597 | 4597 | | |
4598 | 4598 | | |
4599 | 4599 | | |
4600 | | - | |
| 4600 | + | |
| 4601 | + | |
4601 | 4602 | | |
4602 | 4603 | | |
4603 | 4604 | | |
| |||
0 commit comments