diff --git a/communication/packet/linpacket.cpp b/communication/packet/linpacket.cpp index 04c215d..7050254 100644 --- a/communication/packet/linpacket.cpp +++ b/communication/packet/linpacket.cpp @@ -9,7 +9,7 @@ std::shared_ptr HardwareLINPacket::DecodeToMessage(const std::vectorCoreMiniBitsLIN.len; size_t numHeaderBytes = sizeof(HardwareLINPacket::CoreMiniBitsLIN); - if( (sizeof(HardwareLINPacket) != bytestream.size()) || + if( (sizeof(HardwareLINPacket) > bytestream.size()) || ((numDataBytes + numHeaderBytes) > bytestream.size()) ) return nullptr; @@ -17,7 +17,6 @@ std::shared_ptr HardwareLINPacket::DecodeToMessage(const std::vector(static_cast(packet->CoreMiniBitsLIN.ID)); - msg->network = Network::GetNetIDFromCoreMiniNetwork(static_cast(packet->networkID)); msg->isEnhancedChecksum = static_cast(packet->CoreMiniBitsLIN.TxChkSumEnhanced); /* Minimum one responder byte and one checksum byte. */ diff --git a/include/icsneo/communication/packet/linpacket.h b/include/icsneo/communication/packet/linpacket.h index 243dcd0..322f98a 100644 --- a/include/icsneo/communication/packet/linpacket.h +++ b/include/icsneo/communication/packet/linpacket.h @@ -54,9 +54,6 @@ struct HardwareLINPacket { uint16_t stats; //CxTRB0STAT uint64_t timestamp; //Large timestamp - //CoreMiniMsgExtendedHdr - uint16_t networkID; - uint16_t length; }; #pragma pack(pop)