open-dis/open-dis-java

Unmarshal doesn't save/reset buffer position causing issues when with useCopies

Serubin opened this issue · 2 comments

When useCopies is set to true (as it is by default) createPdu is called twice. During the unmarshal portion of this function the buffer is never saved or reset causing the buffer to start at the incorrect location when createPdu is called again in some cases..

For example, when processing an EntityState Pdu the buffer jumps to 144 after being initially processed causing the copy to be processed starting at 144 rather than 0.

Thank you for the report @Serubin

I'm taking a look at your pull request.

Merged - closing