Skip to content

Commit

Permalink
Merge pull request #119 from LORD-MicroStrain/fix/packet
Browse files Browse the repository at this point in the history
Fix packet writing field issue.
  • Loading branch information
dbucksteinhbk authored Dec 11, 2024
2 parents 249cab6 + 73fab7e commit 5066dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/mip/mip_packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class PacketView : public C::mip_packet_view
if(ok)
ok &= C::mip_packet_update_last_field_length(&m_packet, basePointer(), (uint8_t) usedLength()) >= 0;

if(!ok)
if(!ok && basePointer())
C::mip_packet_cancel_last_field(&m_packet, basePointer());

return ok;
Expand Down

0 comments on commit 5066dc1

Please sign in to comment.