diff --git a/jpos/src/main/java/org/jpos/tlv/packager/bertlv/BERTLVPackager.java b/jpos/src/main/java/org/jpos/tlv/packager/bertlv/BERTLVPackager.java index d0124677f4..fdb3738d03 100644 --- a/jpos/src/main/java/org/jpos/tlv/packager/bertlv/BERTLVPackager.java +++ b/jpos/src/main/java/org/jpos/tlv/packager/bertlv/BERTLVPackager.java @@ -447,7 +447,7 @@ 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; } @@ -455,7 +455,7 @@ private int getUninterpretLength(int length, BinaryInterpreter interpreter) { 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; }