open-dis / opendis7-java

Project to provide a complete type-safe Java implementation of the DIS Protocol version 7 (IEEE 1278.1-2012) and SISO-REF-010 Enumerations specifications.
Other
6 stars 5 forks source link

Pdu class copyByPduFactory fails on VariableDatum types #26

Closed terry-norbraten closed 9 months ago

terry-norbraten commented 9 months ago

Some variables, i.e. variableDatumLength, aren't even instantiated until well down into the marshal process, there for a PDU's marshaled length is undetermined at ByteBuffer capacity creation time.

terry-norbraten commented 9 months ago

Fixed by proper setting of the variableDatumLength value when not using the PduFactory.