]> www.average.org Git - YkNeoCR.git/blobdiff - src/org/average/nfcauthcr/YkNeo.java
cleanup workflow
[YkNeoCR.git] / src / org / average / nfcauthcr / YkNeo.java
index 1537459ba7e7c6ef4513370a844fc8b234194e07..26a685350657228170874dc39dc24042e47cc21a 100644 (file)
@@ -54,6 +54,10 @@ public class YkNeo {
                                throw new CRException(
                                "NFC Error code in the response to CR");
                        }
+                       if (length != 22) {
+                               throw new CRException(
+                               "NFC wrong response size: " + (length-2));
+                       }
                        return Arrays.copyOf(resp, length-2);
                } catch (TagLostException e) {
                        throw new CRException("NFC connection lost", e);