fix some potential empty responses and too much inline calls

This commit is contained in:
iceman1001 committed 2023-08-03 08:41:11 +02:00
1 parent a2ea5e3a24
commit 24a138eeb1
5 files changed
+32 -8

No files matched your search

+15 -2
View File
@@ -1230,9 +1230,22 @@ int CmdEM4x50Sim(const char *Cmd) {
clearCommandBuffer();
SendCommandNG(CMD_LF_EM4X50_SIM, (uint8_t *)&password, sizeof(password));
PacketResponseNG resp;
PrintAndLogEx(INFO, "Press " _GREEN_("<Enter>") " or pm3-button to abort simulation");
PacketResponseNG resp;
// init to ZERO
resp.cmd = 0,
resp.length = 0,
resp.magic = 0,
resp.status = 0,
resp.crc = 0,
resp.ng = false,
resp.oldarg[0] = 0;
resp.oldarg[1] = 0;
resp.oldarg[2] = 0;
memset(resp.data.asBytes, 0, PM3_CMD_DATA_SIZE);
bool keypress;
do {
keypress = kbd_enter_pressed();