replace counter instead of increment for large increment

This commit is contained in:
Conor Patrick
2020-02-18 11:18:08 -05:00
parent da31f984dd
commit e294cb3458
+4
View File
@@ -577,7 +577,11 @@ uint32_t ctap_atomic_count(uint32_t amount)
return lastc; return lastc;
} }
if (amount > lastc){
lastc = amount;
} else {
lastc += amount; lastc += amount;
}
if (lastc/256 > erases) if (lastc/256 > erases)
{ {