fix misleading variable name
This commit is contained in:
@@ -830,8 +830,8 @@ public class SecurityTokenConnection {
|
|||||||
CommandApdu chainedApdu = chainedApdus.get(i);
|
CommandApdu chainedApdu = chainedApdus.get(i);
|
||||||
lastResponse = mTransport.transceive(chainedApdu);
|
lastResponse = mTransport.transceive(chainedApdu);
|
||||||
|
|
||||||
boolean isLastCommand = i < totalCommands - 1;
|
boolean isLastCommand = (i == totalCommands - 1);
|
||||||
if (isLastCommand && !lastResponse.isSuccess()) {
|
if (!isLastCommand && !lastResponse.isSuccess()) {
|
||||||
throw new UsbTransportException("Failed to chain apdu (last SW: " + lastResponse.getSw() + ")");
|
throw new UsbTransportException("Failed to chain apdu (last SW: " + lastResponse.getSw() + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user