aboutsummaryrefslogtreecommitdiff
path: root/hw/usb.c
diff options
context:
space:
mode:
authorpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-03-11 20:37:58 +0000
committerpbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>2006-03-11 20:37:58 +0000
commitce5c37c2a4f90473af5255e4ff3ea2c2f260718f (patch)
tree3dcae0b44f1aaffe500f2b5f99fb9213881de0ed /hw/usb.c
parent5b31187812694ef575c20fc3fe3123685a306fde (diff)
downloadqemu-ce5c37c2a4f90473af5255e4ff3ea2c2f260718f.zip
qemu-ce5c37c2a4f90473af5255e4ff3ea2c2f260718f.tar.gz
qemu-ce5c37c2a4f90473af5255e4ff3ea2c2f260718f.tar.bz2
Fix off by one length calciulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1781 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/usb.c')
-rw-r--r--hw/usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/usb.c b/hw/usb.c
index b2830c5..758b341 100644
--- a/hw/usb.c
+++ b/hw/usb.c
@@ -183,7 +183,7 @@ int set_usb_string(uint8_t *buf, const char *str)
q = buf;
len = strlen(str);
- *q++ = 2 * len + 1;
+ *q++ = 2 * len + 2;
*q++ = 3;
for(i = 0; i < len; i++) {
*q++ = str[i];