From 2cd074cf133336c1c68009d3486f08944473dcaf Mon Sep 17 00:00:00 2001 From: Pierre-Luc Tessier Gagne Date: Wed, 23 Sep 2020 08:36:24 -0400 Subject: [PATCH] Setting ExtraDataPtrEnabled when ExtraDataPtr is use --- api/icsneolegacy/icsneolegacy.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/api/icsneolegacy/icsneolegacy.cpp b/api/icsneolegacy/icsneolegacy.cpp index d84cd1c..171ad60 100644 --- a/api/icsneolegacy/icsneolegacy.cpp +++ b/api/icsneolegacy/icsneolegacy.cpp @@ -42,6 +42,7 @@ static void NeoMessageToSpyMessage(const neodevice_t* device, const neomessage_t oldmsg.NumberBytesData = (uint8_t)std::min(newmsg.length, (size_t)255); oldmsg.NumberBytesHeader = 4; oldmsg.ExtraDataPtr = (void*)newmsg.data; + oldmsg.ExtraDataPtrEnabled = newmsg.length > 8 ? 1 :0; memcpy(oldmsg.Data, newmsg.data, std::min(newmsg.length, (size_t)8)); oldmsg.ArbIDOrHeader = *(uint32_t*)newmsg.header; oldmsg.NetworkID = (uint8_t)newmsg.netid; // Note: NetID remapping from the original API is not supported