vanhofen
6 years ago
2 changed files with 15 additions and 0 deletions
@ -0,0 +1,14 @@ |
|||
diff --git a/src/descriptor.cpp b/src/descriptor.cpp
|
|||
index 8c914a9..beaf4d7 100644
|
|||
--- a/src/descriptor.cpp
|
|||
+++ b/src/descriptor.cpp
|
|||
@@ -17,6 +17,9 @@ Descriptor::Descriptor(const uint8_t * const buffer)
|
|||
descriptorTag = buffer[0]; |
|||
descriptorLength = buffer[1]; |
|||
|
|||
+ if (!descriptorLength)
|
|||
+ descriptorLength = 1;
|
|||
+
|
|||
dataBytes.resize(descriptorLength); |
|||
memcpy(&dataBytes[0], &buffer[2], descriptorLength); |
|||
|
Loading…
Reference in new issue