Fix saving of storage
variable
This commit is contained in:
parent
9c8555d695
commit
f293664f80
|
@ -21,7 +21,7 @@ import static hwb1.MyAppletStrings.*;
|
|||
// Insert your strings here
|
||||
name = "MyAppletStrings")
|
||||
public class MyApplet extends Applet {
|
||||
private byte[] storage = null;
|
||||
private byte[] storage = new byte[] {};
|
||||
|
||||
/**
|
||||
* Installs this applet.
|
||||
|
@ -79,6 +79,7 @@ public class MyApplet extends Applet {
|
|||
break;
|
||||
case 0x02:
|
||||
length = apdu.setIncomingAndReceive();
|
||||
storage = new byte[length];
|
||||
|
||||
if (length > 20) {
|
||||
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
|
||||
|
|
Loading…
Reference in a new issue