fix leftover oldargs

This commit is contained in:
iceman1001
2026-08-29 17:06:24 +02:00
parent 87b5ee37c9
commit 1ee41ecf95
4 changed files with 4 additions and 11 deletions
+2 -2
View File
@@ -1821,12 +1821,12 @@ static int acquire_nonces(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_
}
// error during nested_hard
if (resp.oldarg[0]) {
if (resp.status != PM3_SUCCESS) {
if (nonce_file_write) {
fclose(fnonces);
}
DropField();
return resp.oldarg[0];
return resp.status;
}
}
+1
View File
@@ -483,6 +483,7 @@ static int get_proxmark_state(uint32_t *state) {
break;
}
case CMD_DEVICE_INFO: {
// bootloader replies are OLD frames by design, see doc/new_frame_format.md
*state = resp.oldarg[0];
break;
}
+1
View File
@@ -937,6 +937,7 @@ static int dumpmem_pm3(char *serial_port_name, const char *filename, uint32_t ad
PrintAndLogEx(ERR, "Could not get device info.");
goto finish2;
}
// bootrom path: CMD_DEVICE_INFO is served by bootrom.c, which only speaks OLD frames
uint32_t dev_info = resp.oldarg[0];
in_bootloader = (dev_info & DEVICE_INFO_FLAG_CURRENT_MODE_BOOTROM) != 0;
if (in_bootloader) {
-9
View File
@@ -331,15 +331,6 @@ static int l_WaitForResponseTimeout(lua_State *L) {
memcpy(foo + n, &resp.crc, sizeof(resp.crc));
n += sizeof(resp.crc);
memcpy(foo + n, &resp.oldarg[0], sizeof(resp.oldarg[0]));
n += sizeof(resp.oldarg[0]);
memcpy(foo + n, &resp.oldarg[1], sizeof(resp.oldarg[1]));
n += sizeof(resp.oldarg[1]);
memcpy(foo + n, &resp.oldarg[2], sizeof(resp.oldarg[2]));
n += sizeof(resp.oldarg[2]);
memcpy(foo + n, resp.data.asBytes, sizeof(resp.data));
n += sizeof(resp.data);