X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/21e06301b9fe782fcfb7a250c2a42dbfc1a369f0..908536d1616e4953db6fe43de8a6b0cac1972b9a:/client/cmddata.c diff --git a/client/cmddata.c b/client/cmddata.c index 51402b65..533caeb5 100644 --- a/client/cmddata.c +++ b/client/cmddata.c @@ -63,10 +63,8 @@ void printDemodBuff() } if (bitLen>512) bitLen=512; //max output to 512 bits if we have more - should be plenty - // equally divided by 16 - - if ( bitLen % 16 > 0) - bitLen = (bitLen/16)*16; + // ensure equally divided by 16 + bitLen &= 0xfff0; for (i = 0; i <= (bitLen-16); i+=16) { PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i", @@ -200,6 +198,11 @@ void printBitStream(uint8_t BitStream[], uint32_t bitLen) return; } if (bitLen>512) bitLen=512; + + // ensure equally divided by 16 + bitLen &= 0xfff0; + + for (i = 0; i <= (bitLen-16); i+=16) { PrintAndLog("%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i%i", BitStream[i],