浏览代码

fixed the string descriptor send to host more than actual

heyuanjie87 12 年之前
父节点
当前提交
7ce0547575
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/drivers/usb/usbdevice/core/core.c

+ 1 - 1
components/drivers/usb/usbdevice/core/core.c

@@ -124,7 +124,7 @@ static rt_err_t _get_string_descriptor(struct udevice* device, ureq_t setup)
         }
     }
 
-    if(setup->length == 0xFF)
+    if(setup->length > len)
         len = str_desc.bLength;
     else
         len = setup->length;