do the pointer arithmetic before casting
This commit is contained in:
parent
02d4d3a8b8
commit
e435e04945
@ -104,7 +104,7 @@ void DmxWidget::parseMessageBuffer()
|
||||
auto msg = MessageDataFactory((MESSAGE_LABEL)message_rx_buffer_[1], other_side);
|
||||
// fill it with data
|
||||
std::shared_ptr<bufferstream> stream(new bufferstream(
|
||||
reinterpret_cast<uint8_t*>(message_rx_buffer_.data())+fixed_length-1,
|
||||
reinterpret_cast<uint8_t*>(message_rx_buffer_.data()+fixed_length-1),
|
||||
length, bufferstream::LittleEndian));
|
||||
msg->iStream(stream);
|
||||
// ship it
|
||||
|
Loading…
Reference in New Issue
Block a user