From b9842b5ccaae139a40b67156fe85285fd5cbecf5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 13 Aug 2010 11:33:11 +0800 Subject: print decimal card id the same way it is printed on receipts seems like they're now changing endian-ness before printing the decimal UID on the invoice/receipt in shops that accept EasyCard. --- easytool/easytool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easytool/easytool.c b/easytool/easytool.c index 7819eba..62c5a0f 100644 --- a/easytool/easytool.c +++ b/easytool/easytool.c @@ -159,10 +159,10 @@ static void dump_easycard(mifare_tag *mft) (struct mfcl_value_block *) mft->amb[8].mbd.abtData; struct easy_block2sec0 *b2s0 = (struct easy_block2sec0 *) mft->amb[4].mbd.abtData; - uint32_t uid = ntohl(*((uint32_t *) manuf->abtUID)); + uint32_t uid = *((uint32_t *) manuf->abtUID); /* dump the header */ - printf("EasyCard UID 0x%08x (%u)\n", uid, uid); + printf("EasyCard UID 0x%08x (%u)\n", ntohl(uid), uid); printf("Date of manufacture: %s\n", easy_asc_timestamp(b2s0->timestamp)); printf("Current Balance: %5u NTD\n", val->value); -- cgit v1.2.3