fix misleading variable name

This commit is contained in:
Vincent Breitmoser
2018-01-10 17:42:32 +01:00
parent 8706e524aa
commit 9031173b8a

View File

@@ -830,8 +830,8 @@ public class SecurityTokenConnection {
CommandApdu chainedApdu = chainedApdus.get(i);
lastResponse = mTransport.transceive(chainedApdu);
boolean isLastCommand = i < totalCommands - 1;
if (isLastCommand && !lastResponse.isSuccess()) {
boolean isLastCommand = (i == totalCommands - 1);
if (!isLastCommand && !lastResponse.isSuccess()) {
throw new UsbTransportException("Failed to chain apdu (last SW: " + lastResponse.getSw() + ")");
}
}