X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/a7eca42996418a7fd87b3411deb368e41615f9a1..02dfd7dc3ddf5f485bdd47d45867fa58b569ca2f:/LUFA/Drivers/USB/Core/DeviceStandardReq.c diff --git a/LUFA/Drivers/USB/Core/DeviceStandardReq.c b/LUFA/Drivers/USB/Core/DeviceStandardReq.c index a2270f4d2..2ac6c0a54 100644 --- a/LUFA/Drivers/USB/Core/DeviceStandardReq.c +++ b/LUFA/Drivers/USB/Core/DeviceStandardReq.c @@ -204,12 +204,13 @@ static void USB_Device_GetInternalSerialDescriptor(void) struct { USB_Descriptor_Header_t Header; - uint16_t UnicodeString[20]; + uint16_t UnicodeString[INTERNAL_SERIAL_LENGTH_BITS / 4]; } SignatureDescriptor; SignatureDescriptor.Header.Type = DTYPE_String; - SignatureDescriptor.Header.Size = USB_STRING_LEN(USB_Device_GetSerialString(SignatureDescriptor.UnicodeString, - sizeof(SignatureDescriptor.UnicodeString) / sizeof(SignatureDescriptor.UnicodeString[0]))); + SignatureDescriptor.Header.Size = USB_STRING_LEN(INTERNAL_SERIAL_LENGTH_BITS / 4); + + USB_Device_GetSerialString(SignatureDescriptor.UnicodeString); Endpoint_ClearSETUP();