diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-02-25 11:19:55 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-02-25 11:19:55 +0100 |
commit | a17aeedf5d70e8e0328ea19bacdfa298092f318a (patch) | |
tree | c0b48225e7fd1ce14c617b5a0a1c717628f756bb /src/zmq2edi/EDISender.cpp | |
parent | 1691e347524655f3c991af3881febcde7083f1ac (diff) | |
download | dabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.tar.gz dabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.tar.bz2 dabmux-a17aeedf5d70e8e0328ea19bacdfa298092f318a.zip |
zmq2edi: Fix MNSC endianness swap
Diffstat (limited to 'src/zmq2edi/EDISender.cpp')
-rw-r--r-- | src/zmq2edi/EDISender.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zmq2edi/EDISender.cpp b/src/zmq2edi/EDISender.cpp index 112aadb..0df633f 100644 --- a/src/zmq2edi/EDISender.cpp +++ b/src/zmq2edi/EDISender.cpp @@ -192,8 +192,8 @@ void EDISender::send_eti_frame(uint8_t* p, metadata_t metadata) edi_subchannelToTag[i] = tag_ESTn; } - const uint16_t mnsc = p[8 + 4*nst] * 256 + \ - p[8 + 4*nst + 1]; + uint16_t mnsc = 0; + std::memcpy(&mnsc, p + 8 + 4*nst, sizeof(uint16_t)); edi_tagDETI.mnsc = mnsc; /*const uint16_t crc1 = p[8 + 4*nst + 2]*256 + \ |