aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/LowLevel/DevChapter9.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-21 08:04:10 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-21 08:04:10 +0000
commit9d506553aa750264ff6045ff9180397993cb37c0 (patch)
treec549164f53a57623d05bd0d3cbcf3170e99b0448 /LUFA/Drivers/USB/LowLevel/DevChapter9.c
parente0420015df848f18d5eb1672da4ccac578d454cf (diff)
downloadlufa-9d506553aa750264ff6045ff9180397993cb37c0.tar.gz
lufa-9d506553aa750264ff6045ff9180397993cb37c0.tar.bz2
lufa-9d506553aa750264ff6045ff9180397993cb37c0.zip
Trim unique serial number created by the USE_INTERNAL_SERIAL option to 12 characters rather than 20 - apparently Windows will implode if a serial number is too long.
Diffstat (limited to 'LUFA/Drivers/USB/LowLevel/DevChapter9.c')
-rw-r--r--LUFA/Drivers/USB/LowLevel/DevChapter9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/LUFA/Drivers/USB/LowLevel/DevChapter9.c b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
index 9acf30099..55b49b803 100644
--- a/LUFA/Drivers/USB/LowLevel/DevChapter9.c
+++ b/LUFA/Drivers/USB/LowLevel/DevChapter9.c
@@ -182,14 +182,14 @@ static void USB_Device_GetDescriptor(void)
#if defined(USE_INTERNAL_SERIAL)
if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL))
{
- uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 20)];
+ uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 12)];
SignatureDescriptor[0] = sizeof(SignatureDescriptor);
SignatureDescriptor[1] = DTYPE_String;
uint16_t* SigUnicodeChars = (uint16_t*)&SignatureDescriptor[2];
- for (uint8_t SerialByteNum = 0; SerialByteNum < 10; SerialByteNum++)
+ for (uint8_t SerialByteNum = 0; SerialByteNum < 6; SerialByteNum++)
{
char ConvSigString[3];