fix #2835 due to wrong variable used to calculate the size of the emulator memory to download , all get memory from emulator memory failed with a block no larger that 30-ish

This commit is contained in:
iceman1001 2025-05-01 08:34:39 +02:00
commit c847896a15
2 changed files with 2 additions and 1 deletions

View file

@ -1969,7 +1969,7 @@ static void PacketReceived(PacketCommandNG *packet) {
struct p *payload = (struct p *) packet->data.asBytes;
//
size_t size = payload->blockno * payload->blockwidth;
size_t size = payload->blockcnt * payload->blockwidth;
if (size > PM3_CMD_DATA_SIZE) {
reply_ng(CMD_HF_MIFARE_EML_MEMGET, PM3_EMALLOC, NULL, 0);
return;