Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
carltimmer committed Aug 15, 2024
1 parent 2ceb3a5 commit 56996bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/jlab/coda/jevio/EventParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static TagSegmentHeader createTagSegmentHeader(byte bytes[], int offset, ByteOrd
int word = ByteDataTransformer.toInt(bytes, byteOrder, offset);

int len = word & 0xffff;
if ((len < 0) || (4*len + 4 + offset > bytes.length)) {
if (4*len + 4 + offset > bytes.length) {
throw new EvioException("bad length in tagseg header (0x" + Integer.toHexString(len) + ")");
}
header.setLength(len);
Expand Down

0 comments on commit 56996bd

Please sign in to comment.