Merge pull request #2470 from douniwan5788/em410x_clone

fixes for Em
This commit is contained in:
Iceman 2024-08-24 08:53:28 +02:00 committed by GitHub
commit 5dfc12dd45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -710,6 +710,11 @@ static int CmdEM410xClone(const char *Cmd) {
return PM3_EINVARG; return PM3_EINVARG;
} }
if (hs && IfPm3Hitag() == false) {
PrintAndLogEx(FAILED, "Device not compiled to support Hitag");
return PM3_EINVARG;
}
// Allowed clock rates: 16, 32, 40 and 64 // Allowed clock rates: 16, 32, 40 and 64
if ((clk != 16) && (clk != 32) && (clk != 64) && (clk != 40)) { if ((clk != 16) && (clk != 32) && (clk != 64) && (clk != 40)) {
PrintAndLogEx(FAILED, "supported clock rates are " _YELLOW_("16, 32, 40, 64") " got " _RED_("%d") "\n", clk); PrintAndLogEx(FAILED, "supported clock rates are " _YELLOW_("16, 32, 40, 64") " got " _RED_("%d") "\n", clk);

View file

@ -941,7 +941,7 @@ static void em4x05_print_blocks(em_tech_type_t cardtype, uint8_t *data, uint8_t
return; return;
} }
uint32_t *d = (uint32_t *)data; uint32_t *d = (void *)data;
uint8_t i; uint8_t i;
for (i = 0; i < (dlen >> 2); i++) { for (i = 0; i < (dlen >> 2); i++) {