summaryrefslogtreecommitdiff
path: root/openpicc/application/iso14443a_miller.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-15 12:52:35 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-15 12:52:35 +0000
commitbcc75d30ce0fb09618f82bb70cdde82094e86ed8 (patch)
tree88a5f5859842ccd5215607914c4e3e231cd27899 /openpicc/application/iso14443a_miller.c
parent5a29168eaddaaa47909f2ae84c41d0743996215f (diff)
Fix consistency check
Fix miller decoder for the case of a buffer containing only zeroes git-svn-id: https://svn.openpcd.org:2342/trunk@388 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/iso14443a_miller.c')
-rw-r--r--openpicc/application/iso14443a_miller.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/openpicc/application/iso14443a_miller.c b/openpicc/application/iso14443a_miller.c
index 3d132c2..16f0c89 100644
--- a/openpicc/application/iso14443a_miller.c
+++ b/openpicc/application/iso14443a_miller.c
@@ -51,7 +51,7 @@ enum miller_sequence {
int iso14443a_decode_miller(iso14443_frame *frame,
const u_int8_t *sample_buf, const u_int16_t sample_buf_len)
{
- signed int i, j, bit = 0, last_bit = 0;
+ signed int i, j, bit = 0, last_bit = -1;
enum miller_sequence current_seq;
unsigned int bitpos = 0;
@@ -111,8 +111,7 @@ int iso14443a_decode_miller(iso14443_frame *frame,
DumpUIntToUSB(frame->numbytes);
DumpStringToUSB(" bytes, ");
DumpUIntToUSB(frame->numbits);
- DumpStringToUSB(" bits");
- DumpStringToUSB("\n\r");
+ DumpStringToUSB(" bits ");
return 0;
}
personal git repositories of Harald Welte. Your mileage may vary