replace counter instead of increment for large increment

This commit is contained in:
Conor Patrick 2019-10-29 08:25:58 -04:00
parent 3af4830725
commit be99caf2a2

View File

@ -560,7 +560,11 @@ uint32_t ctap_atomic_count(uint32_t amount)
return lastc;
}
lastc += amount;
if (amount > lastc){
lastc = amount;
} else {
lastc += amount;
}
if (lastc/256 > erases)
{