return correct length of LangID string to host

This commit is contained in:
heyuanjie87 2013-05-30 18:26:52 +08:00
parent 3f74a95663
commit 376a08d89a

View File

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