Skip to content

Commit a509c16

Browse files
tstennercboulay
authored andcommitted
Use native endianness for "portable" byte order
1 parent 4501710 commit a509c16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/data_receiver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ void data_receiver::data_thread() {
227227
// get the header information
228228
if (type == "byte-order") {
229229
int use_byte_order = std::stoi(rest);
230+
// needed for interoperability with liblsl ~1.13 and data protocol 100
231+
if(use_byte_order == 0) use_byte_order = LSL_BYTE_ORDER;
230232
auto value_size = format_sizes[conn_.type_info().channel_format()];
231233
if (!lsl::can_convert_endian(use_byte_order, value_size))
232234
throw std::runtime_error(

0 commit comments

Comments
 (0)