mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-21 05:43:23 -07:00
add: proper indentation when printing TLV objects
This commit is contained in:
parent
e464f62258
commit
43912d6349
7 changed files with 43 additions and 25 deletions
|
@ -10,9 +10,9 @@
|
|||
|
||||
#include "emvcore.h"
|
||||
|
||||
static bool print_cb(void *data, const struct tlv *tlv) {
|
||||
emv_tag_dump(tlv, stdout);
|
||||
dump_buffer(tlv->value, tlv->len, stdout);
|
||||
static bool print_cb(void *data, const struct tlv *tlv, int level) {
|
||||
emv_tag_dump(tlv, stdout, level);
|
||||
dump_buffer(tlv->value, tlv->len, stdout, level);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ void TLVPrintFromBuffer(uint8_t *data, int datalen) {
|
|||
if (t) {
|
||||
PrintAndLog("TLV decoded:");
|
||||
|
||||
tlvdb_visit(t, print_cb, NULL);
|
||||
tlvdb_visit(t, print_cb, NULL, 0);
|
||||
tlvdb_free(t);
|
||||
} else {
|
||||
PrintAndLog("TLV ERROR: Can't parse response as TLV tree.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue