diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2014-01-08 10:51:48 +1100 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2014-01-08 10:51:48 +1100 |
commit | 578976788971c370ba61aa7fd20530d05319c2d9 (patch) | |
tree | 18ebed036dd895cbc93e04583d88660cb49b915b | |
parent | 32c5c43bf015c190f93c9c68d496ef6a5e68e874 (diff) | |
download | lufa-578976788971c370ba61aa7fd20530d05319c2d9.tar.gz lufa-578976788971c370ba61aa7fd20530d05319c2d9.tar.bz2 lufa-578976788971c370ba61aa7fd20530d05319c2d9.zip |
Fix USB_STRING_DESCRIPTOR() macro reported length to account for the null-terminator.
-rw-r--r-- | LUFA/Drivers/USB/Core/StdDescriptors.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LUFA/Drivers/USB/Core/StdDescriptors.h b/LUFA/Drivers/USB/Core/StdDescriptors.h index 624f3dea3..d611bf37f 100644 --- a/LUFA/Drivers/USB/Core/StdDescriptors.h +++ b/LUFA/Drivers/USB/Core/StdDescriptors.h @@ -91,7 +91,7 @@ * * \param[in] String String to initialize a USB String Descriptor structure with. */ - #define USB_STRING_DESCRIPTOR(String) { .Header = {.Size = sizeof(String), .Type = DTYPE_String}, .UnicodeString = String } + #define USB_STRING_DESCRIPTOR(String) { .Header = {.Size = (sizeof(String) - 2), .Type = DTYPE_String}, .UnicodeString = String } /** Convenience macro to easily create \ref USB_Descriptor_String_t instances from an array of characters. * |