diff --git a/hwb1/src/hwb1/MyApplet.java b/hwb1/src/hwb1/MyApplet.java index 02c5513..0049ced 100644 --- a/hwb1/src/hwb1/MyApplet.java +++ b/hwb1/src/hwb1/MyApplet.java @@ -65,12 +65,13 @@ public class MyApplet extends Applet { if (instruction == 0x00) { response = AuthorName; + length = (short)response.length; } else { response = storage; - } - if (length > response.length) { - length = (short) response.length; + if (length > response.length) { + length = (short) response.length; + } } apdu.setOutgoingLength(length);