summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/usbd_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/usbd_core.c b/core/usbd_core.c
index 4d1701cb..48723df9 100644
--- a/core/usbd_core.c
+++ b/core/usbd_core.c
@@ -289,7 +289,8 @@ static bool usbd_get_descriptor(uint16_t type_index, uint8_t **data, uint32_t *l
return false;
}
- *data = (uint8_t *)msosv1_desc->string;
+ //*data = (uint8_t *)msosv1_desc->string;
+ memcpy(*data, (uint8_t *)msosv1_desc->string, msosv1_desc->string_len);
*len = msosv1_desc->string_len;
return true;
@@ -300,7 +301,8 @@ static bool usbd_get_descriptor(uint16_t type_index, uint8_t **data, uint32_t *l
return false;
}
- *data = bos_desc->string;
+ //*data = bos_desc->string;
+ memcpy(*data, (uint8_t *)bos_desc->string, bos_desc->string_len);
*len = bos_desc->string_len;
return true;
}