replace counter instead of increment for large increment

This commit is contained in:
Conor Patrick
2019-10-29 08:25:58 -04:00
parent da31f984dd
commit e294cb3458

View File

@@ -577,7 +577,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)
{