openigtlink / OpenIGTLink

Free, open-source network communication library for image-guided therapy
http://openigtlink.org
BSD 3-Clause "New" or "Revised" License
103 stars 185 forks source link

BUG: Fix error when unpacking messages with v1 header #253

Closed Sunderlandkyl closed 2 years ago

Sunderlandkyl commented 2 years ago

When unpacking a message with a v1 header, igtlMessageBase::UnpackHeader attempted to unpack the extended header and metadata. This resulted in failure since neither are valid for v1 headers.

Fixed by only attempting to unpack the extended header and metadata for header version >= 2.

Sunderlandkyl commented 2 years ago

@leochan2009