Skip to content

Commit

Permalink
Fix wrong read length
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpaljak committed Jul 10, 2023
1 parent ef9757f commit 4d63d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/pro/javacard/nfc4pc/NDEF.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static Optional<byte[]> getType2(APDUBIBO b) throws BIBOException {
log.debug("Reading block {}", i);
log.debug("Current payload: ({} bytes) {}", payload.toByteArray().length, HexUtils.bin2hex(payload.toByteArray()));

var block = b.transmit(new CommandAPDU(0xFF, 0xB0, 0x00, i, 0x10));
var block = b.transmit(new CommandAPDU(0xFF, 0xB0, 0x00, i, 4));
var bytes = block.getData();
if (block.getSW() == 0x9000) {
log.debug("Block: {}", HexUtils.bin2hex(bytes));
Expand Down

0 comments on commit 4d63d2a

Please sign in to comment.