diff options
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -997,6 +997,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, if (field->flags & VMS_ARRAY) { n_elems = field->num; + } else if (field->flags & VMS_VARRAY) { + n_elems = *(size_t *)(opaque+field->num_offset); } if (field->flags & VMS_POINTER) { base_addr = *(void **)base_addr; @@ -1031,6 +1033,8 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, if (field->flags & VMS_ARRAY) { n_elems = field->num; + } else if (field->flags & VMS_VARRAY) { + n_elems = *(size_t *)(opaque+field->num_offset); } if (field->flags & VMS_POINTER) { base_addr = *(void **)base_addr; |