From 82fa39b75181b730d6d4d09f443bd26bcfcd045c Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Thu, 10 Mar 2011 12:33:49 +0100 Subject: vmstate: Fix varrays with uint8 indexes Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori --- savevm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'savevm.c') diff --git a/savevm.c b/savevm.c index ce063d1e55..4db036b3c7 100644 --- a/savevm.c +++ b/savevm.c @@ -1331,6 +1331,8 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd, n_elems = *(int32_t *)(opaque+field->num_offset); } else if (field->flags & VMS_VARRAY_UINT16) { n_elems = *(uint16_t *)(opaque+field->num_offset); + } else if (field->flags & VMS_VARRAY_UINT8) { + n_elems = *(uint8_t *)(opaque+field->num_offset); } if (field->flags & VMS_POINTER) { base_addr = *(void **)base_addr + field->start; -- cgit v1.2.3