From 0e4f5f486593e8bb11cb108d74b5291fe4f0aecb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 29 Oct 2020 10:29:03 +0100 Subject: [PATCH] fix #1036 , wrong offset used. Thanks @xianglin1998 --- client/src/cmdhf15.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 0129dbaf5..8754c7a05 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -1853,10 +1853,10 @@ static int CmdHF15Restore(const char *Cmd) { if (addressed_mode) { char uidhex[17] = {0x00}; hex_to_buffer((uint8_t *)uidhex, uid, sizeof(uid), sizeof(uidhex) - 1, 0, false, true); - hex_to_buffer((uint8_t *)hex, data + i, blocksize, sizeof(hex) - 1, 0, false, true); + hex_to_buffer((uint8_t *)hex, data + bytes, blocksize, sizeof(hex) - 1, 0, false, true); snprintf(tmpCmd, sizeof(tmpCmd), "%s %s %u %s", newPrefix, uidhex, i, hex); } else { - hex_to_buffer((uint8_t *)hex, data + i, blocksize, sizeof(hex) - 1, 0, false, true); + hex_to_buffer((uint8_t *)hex, data + bytes, blocksize, sizeof(hex) - 1, 0, false, true); snprintf(tmpCmd, sizeof(tmpCmd), "%s u %u %s", newPrefix, i, hex); }