1
0
Fork 0

initialize at allocation

This commit is contained in:
Kevin Matz 2023-05-18 14:44:31 -04:00
parent f7a79c5a40
commit 41c89e06e0
1 changed files with 1 additions and 2 deletions

View File

@ -158,8 +158,7 @@ void Pdu::iStream(Stream stream)
flags_._raw = stream->peek() & 0xf0; // high 4 bits are flags
// get the length
size_t length;
length = stream->readType<uint16_t>() & 0x0fff; // high 4 bits are flags
size_t length = stream->readType<uint16_t>() & 0x0fff; // high 4 bits are flags
if (flags_.hasLength)
length = (length << 8 ) | stream->readType<uint8_t>();