Skip to content

Commit

Permalink
fix padding end issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yinheli committed Nov 28, 2014
1 parent e9defcf commit e16bd27
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jpos/src/main/java/org/jpos/tlv/TLVList.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,12 @@ private int getTAG(ByteBuffer buffer) {
// Skip padding chars
if (b == 0xFF || b == 0x00) {
do {
b = buffer.get() & 0xff;
} while ((b == 0xFF || b == 0x00) && hasNext(buffer));
if (hasNext(buffer)) {
b = buffer.get() & 0xff;
} else {
break;
}
} while ((b == 0xFF || b == 0x00));
}
// Get first byte of Tag Identifier
tag = b;
Expand Down

0 comments on commit e16bd27

Please sign in to comment.