mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-22 06:13:27 -07:00
added several buffers to printBitsPar
This commit is contained in:
parent
e766442060
commit
a965ed1b13
1 changed files with 8 additions and 2 deletions
|
@ -357,8 +357,14 @@ char * printBits(size_t const size, void const * const ptr)
|
|||
}
|
||||
|
||||
char * printBitsPar(const uint8_t *b, size_t len) {
|
||||
static char buf[1024] = {0};
|
||||
memset(buf, 0x00, 1024);
|
||||
static char buf1[512] = {0};
|
||||
static char buf2[512] = {0};
|
||||
static char *buf;
|
||||
if (buf != buf1)
|
||||
buf = buf1;
|
||||
else
|
||||
buf = buf2;
|
||||
memset(buf, 0x00, 512);
|
||||
|
||||
for (int i = 0; i < len; i++) {
|
||||
buf[i] = ((b[i / 8] << (i % 8)) & 0x80) ? '1':'0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue