Commit 4759e273 authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #420 from dwrensha/struct-list-upgrade

Make sure to clear tag word when upgrading a struct list.
parents a98a8eb0 e194e5e4
......@@ -1360,7 +1360,9 @@ struct WireHelpers {
}
// Zero out old location. See explanation in getWritableStructPointer().
memset(oldPtr, 0, oldStep * elementCount * BYTES_PER_WORD / BYTES);
// Make sure to include the tag word.
memset(oldPtr - POINTER_SIZE_IN_WORDS, 0,
(POINTER_SIZE_IN_WORDS + oldStep * elementCount) * BYTES_PER_WORD / BYTES);
return ListBuilder(origSegment, capTable, newPtr, newStep * BITS_PER_WORD, elementCount,
newDataSize * BITS_PER_WORD, newPointerCount, ElementSize::INLINE_COMPOSITE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment