On 10/26/2011 02:31 PM, Kevin Wolf wrote:
Signed-off-by: Kevin Wolf<kw...@redhat.com>
---
hw/ide/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 280a117..29305d3 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2039,7 +2039,7 @@ static int ide_drive_pio_post_load(void *opaque, int
version_id)
{
IDEState *s = opaque;
- if (s->end_transfer_fn_idx> ARRAY_SIZE(transfer_end_table)) {
+ if (s->end_transfer_fn_idx>= ARRAY_SIZE(transfer_end_table)) {
return -EINVAL;
}
s->end_transfer_func = transfer_end_table[s->end_transfer_fn_idx];
Reviewed-by: Paolo Bonzini <pbonz...@redhat.com>