Skip to content

Commit

Permalink
applied @barspi solution and changed getUninterpretLength(Integer, In…
Browse files Browse the repository at this point in the history
…terpeter)
  • Loading branch information
T-eli authored and ar committed Nov 24, 2023
1 parent 1fec7c6 commit cf7c2c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,15 @@ public void unpack(ISOComponent m, InputStream in) throws IOException, ISOExcept
private int getUninterpretLength(int length, BinaryInterpreter interpreter) {
if (length > 0) {
int lengthAdjusted = length + length % 2;
return (int) (length * (lengthAdjusted / (double) interpreter.getPackedLength(lengthAdjusted)));
return (length * lengthAdjusted) / interpreter.getPackedLength(lengthAdjusted);
}
return 0;
}

private int getUninterpretLength(int length, Interpreter interpreter) {
if (length > 0) {
int lengthAdjusted = length + length % 2;
return length * (lengthAdjusted / interpreter.getPackedLength(lengthAdjusted));
return (length * lengthAdjusted) / interpreter.getPackedLength(lengthAdjusted);
}
return 0;
}
Expand Down

0 comments on commit cf7c2c9

Please sign in to comment.