replace counter instead of increment for large increment
This commit is contained in:
parent
3af4830725
commit
be99caf2a2
@ -560,7 +560,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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user