aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index 1125ef2d53..17a6c97053 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1147,6 +1147,9 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
if (field->flags & VMS_VBUFFER) {
size = *(int32_t *)(opaque+field->size_offset);
+ if (field->flags & VMS_MULTIPLY) {
+ size *= field->size;
+ }
}
if (field->flags & VMS_ARRAY) {
n_elems = field->num;
@@ -1200,6 +1203,9 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
if (field->flags & VMS_VBUFFER) {
size = *(int32_t *)(opaque+field->size_offset);
+ if (field->flags & VMS_MULTIPLY) {
+ size *= field->size;
+ }
}
if (field->flags & VMS_ARRAY) {
n_elems = field->num;