Trim unique serial number created by the USE_INTERNAL_SERIAL option to 12 characters...
[pub/USBasp.git] / LUFA / Drivers / USB / LowLevel / DevChapter9.c
index 9acf300..55b49b8 100644 (file)
@@ -182,14 +182,14 @@ static void USB_Device_GetDescriptor(void)
        #if defined(USE_INTERNAL_SERIAL)\r
        if (USB_ControlRequest.wValue == ((DTYPE_String << 8) | USE_INTERNAL_SERIAL))\r
        {\r
-               uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 20)];\r
+               uint8_t SignatureDescriptor[2 + (sizeof(int16_t) * 12)];\r
 \r
                SignatureDescriptor[0] = sizeof(SignatureDescriptor);\r
                SignatureDescriptor[1] = DTYPE_String;\r
                \r
                uint16_t* SigUnicodeChars = (uint16_t*)&SignatureDescriptor[2];\r
 \r
-               for (uint8_t SerialByteNum = 0; SerialByteNum < 10; SerialByteNum++)\r
+               for (uint8_t SerialByteNum = 0; SerialByteNum < 6; SerialByteNum++)\r
                {\r
                        char ConvSigString[3];\r
 \r