From e435e049453ace158066557ade0e5d3af3e9351f Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sun, 9 Apr 2023 20:20:17 -0400 Subject: [PATCH] do the pointer arithmetic before casting --- platform/qt/dmxwidget/dmxwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/qt/dmxwidget/dmxwidget.cpp b/platform/qt/dmxwidget/dmxwidget.cpp index 085538c..a3f5a69 100644 --- a/platform/qt/dmxwidget/dmxwidget.cpp +++ b/platform/qt/dmxwidget/dmxwidget.cpp @@ -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 stream(new bufferstream( - reinterpret_cast(message_rx_buffer_.data())+fixed_length-1, + reinterpret_cast(message_rx_buffer_.data()+fixed_length-1), length, bufferstream::LittleEndian)); msg->iStream(stream); // ship it