small fix taken over
This commit is contained in:
parent
2f53a3fb1b
commit
8e7f167a66
@ -30,15 +30,16 @@ ReturnValue_t SerialBufferAdapter<T>::serialize(uint8_t** buffer, size_t* size,
|
||||
}
|
||||
if (*size + serializedLength > maxSize) {
|
||||
return BUFFER_TOO_SHORT;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (serializeLength) {
|
||||
SerializeAdapter::serialize(&bufferLength, buffer, size,
|
||||
maxSize, streamEndianness);
|
||||
}
|
||||
if (constBuffer != nullptr) {
|
||||
if (this->constBuffer != nullptr) {
|
||||
memcpy(*buffer, this->constBuffer, bufferLength);
|
||||
}
|
||||
else if (buffer != nullptr) {
|
||||
else if (this->buffer != nullptr) {
|
||||
// This will propably be never reached, constBuffer should always be
|
||||
// set if non-const buffer is set.
|
||||
memcpy(*buffer, this->buffer, bufferLength);
|
||||
|
Loading…
Reference in New Issue
Block a user