From 9cbf6c441ee2ab1da01a306cc42c0ab604e0f536 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 19 Aug 2020 16:41:28 +0200 Subject: [PATCH] fix - running esave after fchk gave empty accessrights --- armsrc/mifarecmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/armsrc/mifarecmd.c b/armsrc/mifarecmd.c index 9e19cbc53..d99698ba8 100644 --- a/armsrc/mifarecmd.c +++ b/armsrc/mifarecmd.c @@ -1644,7 +1644,7 @@ OUT: bar |= ((uint16_t)(found[m] & 1) << j++); } - uint8_t *tmp = BigBuf_malloc(480 + 10); + uint8_t *tmp = BigBuf_malloc(480 + 10); memcpy(tmp, k_sector, sectorcnt * sizeof(sector_t)); num_to_bytes(foo, 8, tmp + 480); tmp[488] = bar & 0xFF; @@ -1974,7 +1974,7 @@ int MifareECardLoad(uint8_t sectorcnt, uint8_t keytype) { emlSetMem(dataoutbuf, FirstBlockOfSector(sectorNo) + blockNo, 1); } else { // sector trailer, keep the keys, set only the AC emlGetMem(dataoutbuf2, FirstBlockOfSector(sectorNo) + blockNo, 1); - memcpy(&dataoutbuf2[6], &dataoutbuf[6], 4); + memcpy(dataoutbuf2 + 6, dataoutbuf + 6, 4); emlSetMem(dataoutbuf2, FirstBlockOfSector(sectorNo) + blockNo, 1); } }