diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-08-13 11:33:11 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-08-13 11:33:11 +0800 |
commit | b9842b5ccaae139a40b67156fe85285fd5cbecf5 (patch) | |
tree | bb0b6813db75d2594042212e75d655782290af0f | |
parent | 9f5c9f9a66defcc2f70385c40d699b318d34f489 (diff) |
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.
-rw-r--r-- | easytool/easytool.c | 4 |
1 files 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); |