Commit ce5c37c2a4f90473af5255e4ff3ea2c2f260718f

Authored by pbrook
1 parent 5b311878

Fix off by one length calciulation.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1781 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 1 additions and 1 deletions
hw/usb.c
... ... @@ -183,7 +183,7 @@ int set_usb_string(uint8_t *buf, const char *str)
183 183  
184 184 q = buf;
185 185 len = strlen(str);
186   - *q++ = 2 * len + 1;
  186 + *q++ = 2 * len + 2;
187 187 *q++ = 3;
188 188 for(i = 0; i < len; i++) {
189 189 *q++ = str[i];
... ...