diff --git a/hwb1/src/hwb1/MyApplet.java b/hwb1/src/hwb1/MyApplet.java index 843f90f..a5c4ee9 100644 --- a/hwb1/src/hwb1/MyApplet.java +++ b/hwb1/src/hwb1/MyApplet.java @@ -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);