mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
fix: 'mem load' - wrong offset when uploading
This commit is contained in:
parent
3ef9102c17
commit
e50fef6607
3 changed files with 12 additions and 13 deletions
|
@ -124,14 +124,14 @@ int CmdFlashMemLoad(const char *Cmd){
|
|||
|
||||
//Send to device
|
||||
uint32_t bytes_sent = 0;
|
||||
uint32_t bytes_remaining = bytes_read;
|
||||
uint32_t bytes_remaining = bytes_read;
|
||||
|
||||
while (bytes_remaining > 0){
|
||||
uint32_t bytes_in_packet = MIN(FLASH_MEM_BLOCK_SIZE, bytes_remaining);
|
||||
|
||||
UsbCommand c = {CMD_WRITE_FLASH_MEM, {start_index + bytes_sent, bytes_in_packet, 0}};
|
||||
|
||||
memcpy(c.d.asBytes, dump + start_index + bytes_sent, bytes_in_packet);
|
||||
memcpy(c.d.asBytes, dump + bytes_sent, bytes_in_packet);
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue