From b430b37f70ebfdf9ee2ffafd821adc3bca911564 Mon Sep 17 00:00:00 2001 From: Ave Date: Sun, 6 Sep 2020 16:15:45 +0300 Subject: [PATCH] UL: Handle compatibility writes correctly --- Firmware/Chameleon-Mini/Application/MifareUltralight.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Chameleon-Mini/Application/MifareUltralight.c b/Firmware/Chameleon-Mini/Application/MifareUltralight.c index 1ce11c2e..2272869e 100644 --- a/Firmware/Chameleon-Mini/Application/MifareUltralight.c +++ b/Firmware/Chameleon-Mini/Application/MifareUltralight.c @@ -285,7 +285,7 @@ static uint16_t AppProcess(uint8_t *const Buffer, uint16_t ByteCount) { //Handle MF ULC counter if (CompatWritePageAddress == MF_ULC_COUNTER_ADDRESS && Flavor == UL_C) { - if (IncrementCounter(&Buffer[2])) { + if (IncrementCounter(&Buffer[0])) { Buffer[0] = ACK_VALUE; return ACK_FRAME_SIZE; } else { @@ -294,7 +294,7 @@ static uint16_t AppProcess(uint8_t *const Buffer, uint16_t ByteCount) { } } - AppWritePage(CompatWritePageAddress, &Buffer[2]); + AppWritePage(CompatWritePageAddress, &Buffer[0]); Buffer[0] = ACK_VALUE; return ACK_FRAME_SIZE; }