mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
Fix off by one length calciulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1781 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
5b31187812
commit
ce5c37c2a4
1 changed files with 1 additions and 1 deletions
2
hw/usb.c
2
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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue