t55xx info: fix q5 condition

This commit is contained in:
Philippe Teuwen 2019-04-02 22:08:50 +02:00
parent 21be6d4400
commit 5225722a50

View file

@ -1398,7 +1398,7 @@ int CmdT55xxInfo(const char *Cmd) {
} }
PrintAndLogEx(NORMAL, ""); PrintAndLogEx(NORMAL, "");
if (config.Q5 || (gotdata && dataasq5)) { if (((!gotdata) && config.Q5) || (gotdata && dataasq5)) {
uint32_t header = (block0 >> (32 - 12)) & 0xFFF; uint32_t header = (block0 >> (32 - 12)) & 0xFFF;
uint32_t ps = (block0 >> (32 - 13)) & 0x01; uint32_t ps = (block0 >> (32 - 13)) & 0x01;
uint32_t fw = (block0 >> (32 - 14)) & 0x01; uint32_t fw = (block0 >> (32 - 14)) & 0x01;
@ -1469,7 +1469,8 @@ int CmdT55xxInfo(const char *Cmd) {
else else
PrintAndLogEx(NORMAL, " Block 0 : 0x%08X %s", block0, sprint_bin(DemodBuffer + config.offset, 32)); PrintAndLogEx(NORMAL, " Block 0 : 0x%08X %s", block0, sprint_bin(DemodBuffer + config.offset, 32));
PrintAndLogEx(NORMAL, "-------------------------------------------------------------"); PrintAndLogEx(NORMAL, "-------------------------------------------------------------");
printT5x7KnownBlock0(block0); if (((!gotdata) && (!config.Q5)) || (gotdata && (!dataasq5)))
printT5x7KnownBlock0(block0);
return 0; return 0;
} }