Initialize RecordVal default fields when redef'd

If a RecordVal had been created, but later its RecordType redef'd to
contain fields with &default, those fields were incorrectly left
uninitialized.
This commit is contained in:
Jon Siwek 2020-03-12 18:46:37 -07:00
parent 71b82595ba
commit 7a397d2746
3 changed files with 8 additions and 7 deletions

View file

@ -2762,7 +2762,7 @@ void RecordVal::ResizeParseTimeRecords(RecordType* rt)
vs->resize(required_length);
for ( auto i = current_length; i < required_length; ++i )
vs->replace(i, nullptr);
vs->replace(i, rt->FieldDefault(i));
}
}
}