Skip to content

Commit

Permalink
Merge pull request #140 from McEloff/fix_ev1_counters
Browse files Browse the repository at this point in the history
BugFix: incorrect NTAG/EV1 increment counter value
  • Loading branch information
iceman1001 authored Sep 10, 2019
2 parents 90abdd1 + 0d3327d commit 857063e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Firmware/ChameleonMini/Application/MifareUltralight.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ static uint16_t AppProcess(uint8_t* const Buffer, uint16_t ByteCount)

case CMD_INCREMENT_CNT: {
uint8_t CounterId = Buffer[1];
uint32_t Addend = (Buffer[0]) | (Buffer[1] << 8) | ((uint32_t)Buffer[2] << 16);
uint32_t Addend = ((uint32_t)Buffer[2]) | ((uint32_t)Buffer[3] << 8) | ((uint32_t)Buffer[4] << 16);
uint32_t Counter = 0;
/* Validation */
if (CounterId > CNT_MAX) {
Expand Down

0 comments on commit 857063e

Please sign in to comment.