2002-10-07 Pierre Muller <muller@ics.u-strasbg.fr>
* values.c (value_change_enclosing_type): Set enclosing_type field correctly also for the case where more memory needs to be allocated.
This commit is contained in:
parent
911b232a92
commit
cc303028fc
2 changed files with 9 additions and 1 deletions
|
@ -862,7 +862,9 @@ value_change_enclosing_type (struct value *val, struct type *new_encl_type)
|
|||
struct value *prev;
|
||||
|
||||
new_val = (struct value *) xrealloc (val, sizeof (struct value) + TYPE_LENGTH (new_encl_type));
|
||||
|
||||
|
||||
VALUE_ENCLOSING_TYPE (new_val) = new_encl_type;
|
||||
|
||||
/* We have to make sure this ends up in the same place in the value
|
||||
chain as the original copy, so it's clean-up behavior is the same.
|
||||
If the value has been released, this is a waste of time, but there
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue