chg: cleaning up some function calls.

fix: check to see clock is bigger than zero.
This commit is contained in:
iceman1001 2017-11-09 19:15:56 +01:00
commit 30ceea4aea
8 changed files with 114 additions and 85 deletions

View file

@ -201,12 +201,12 @@ int CmdLFHitagReader(const char *Cmd) {
switch (htf) {
case 01: { //RHTSF_CHALLENGE
c = (UsbCommand){ CMD_READ_HITAG_S };
c.cmd = CMD_READ_HITAG_S;
num_to_bytes(param_get32ex(Cmd, 1, 0, 16), 4, htd->auth.NrAr);
num_to_bytes(param_get32ex(Cmd, 2, 0, 16), 4, htd->auth.NrAr+4);
} break;
case 02: { //RHTSF_KEY
c = (UsbCommand){ CMD_READ_HITAG_S };
c.cmd = CMD_READ_HITAG_S;
num_to_bytes(param_get64ex(Cmd, 1, 0, 16), 6, htd->crypto.key);
} break;
case RHT2F_PASSWORD: {