diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-04-25 11:53:22 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-05-05 12:57:30 +0200 |
commit | ada435f47ea97546354d6990a952a4825dfb286e (patch) | |
tree | 7f694616a95634bec0d6ad4923812bf16fe3dc77 /hw/usb/dev-mtp.c | |
parent | 1c76551fae0daa681f0c3298cc16fcb3d4ee01fd (diff) | |
download | qemu-ada435f47ea97546354d6990a952a4825dfb286e.zip qemu-ada435f47ea97546354d6990a952a4825dfb286e.tar.gz qemu-ada435f47ea97546354d6990a952a4825dfb286e.tar.bz2 |
usb: mtp: fix usb_mtp_add_u64
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/usb/dev-mtp.c')
-rw-r--r-- | hw/usb/dev-mtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 17df447..063a426 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -416,7 +416,7 @@ static void usb_mtp_add_u32(MTPData *data, uint32_t val) static void usb_mtp_add_u64(MTPData *data, uint64_t val) { - usb_mtp_realloc(data, 4); + usb_mtp_realloc(data, 8); data->data[data->length++] = (val >> 0) & 0xff; data->data[data->length++] = (val >> 8) & 0xff; data->data[data->length++] = (val >> 16) & 0xff; @@ -424,7 +424,7 @@ static void usb_mtp_add_u64(MTPData *data, uint64_t val) data->data[data->length++] = (val >> 32) & 0xff; data->data[data->length++] = (val >> 40) & 0xff; data->data[data->length++] = (val >> 48) & 0xff; - data->data[data->length++] = (val >> 54) & 0xff; + data->data[data->length++] = (val >> 56) & 0xff; } static void usb_mtp_add_u16_array(MTPData *data, uint32_t len, |