avoid truncating struct size
This commit is contained in:
parent
84dcb10085
commit
9bb1032274
1 changed files with 1 additions and 1 deletions
|
@ -1008,7 +1008,7 @@ final class WireHelpers {
|
||||||
}
|
}
|
||||||
|
|
||||||
static SegmentBuilder setStructPointer(SegmentBuilder segment, CapTableBuilder capTable, int refOffset, StructReader value) {
|
static SegmentBuilder setStructPointer(SegmentBuilder segment, CapTableBuilder capTable, int refOffset, StructReader value) {
|
||||||
short dataSize = (short)roundBitsUpToWords(value.dataSize);
|
int dataSize = roundBitsUpToWords(value.dataSize);
|
||||||
int totalSize = dataSize + value.pointerCount * Constants.POINTER_SIZE_IN_WORDS;
|
int totalSize = dataSize + value.pointerCount * Constants.POINTER_SIZE_IN_WORDS;
|
||||||
|
|
||||||
AllocateResult allocation = allocate(refOffset, segment, capTable, totalSize, WirePointer.STRUCT);
|
AllocateResult allocation = allocate(refOffset, segment, capTable, totalSize, WirePointer.STRUCT);
|
||||||
|
|
Loading…
Reference in a new issue