Fix readCompactLength()

This commit is contained in:
László Monda
2017-06-15 12:57:34 +02:00
parent 4af31c2e12
commit ad5a9baa5d

View File

@@ -50,7 +50,7 @@ static bool readBool(serialized_buffer_t *buffer) {
static uint16_t readCompactLength(serialized_buffer_t *buffer) {
uint16_t length = readUInt8(buffer);
if (length == longCompactLengthPrefix) {
length += readUInt8(buffer) << 8;
length = readUInt16(buffer);
}
return length;
}