If data was still in MeshLink's internal buffer in a wrapped state, and
the application called meshlink_set_channel_*buf_storage(), the wrong
amount of data was copied into the new buffer.
// [012345......]
uint32_t tailsize = buf->size - buf->offset;
memcpy(newdata, buf->data + buf->offset, tailsize);
- memcpy(newdata + tailsize, buf->data, buf->used - buf->offset);
+ memcpy(newdata + tailsize, buf->data, buf->used - tailsize);
} else {
// Old situation:
// [....012345..]