Skip to content

Commit

Permalink
open-dis#68: Test fixing...
Browse files Browse the repository at this point in the history
  • Loading branch information
abutler committed Mar 12, 2020
1 parent 80cf439 commit 56cf739
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/edu/nps/moves/dis/Pdu.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ public void unmarshal(DataInputStream dis)
dis.mark(header.length);
dis.read(header, 0, header.length);
int pduLength = ByteBuffer.wrap(header).getShort(8);
setPduLength(pduLength);
dis.reset();

// Now allocate enough space for full pdu
Expand Down Expand Up @@ -230,6 +231,7 @@ public void unmarshal(java.nio.ByteBuffer buff)
protocolFamily = (short)(toUnsignedInt(buff.get()));
timestamp = buff.getInt();
int pduLength = toUnsignedInt(buff.getShort());
setPduLength(pduLength);
padding = buff.getShort();
} // end of unmarshal method

Expand Down

0 comments on commit 56cf739

Please sign in to comment.