mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
avoid overflow of update counter on task interfaces
This commit is contained in:
@@ -130,6 +130,9 @@ class TaskInterfacesStorage{
|
|||||||
auto vit=values.find(name);
|
auto vit=values.find(name);
|
||||||
if (vit != values.end()){
|
if (vit != values.end()){
|
||||||
vit->second.updates++;
|
vit->second.updates++;
|
||||||
|
if (vit->second.updates < 0){
|
||||||
|
vit->second.updates=0;
|
||||||
|
}
|
||||||
vit->second.ptr=v;
|
vit->second.ptr=v;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
Reference in New Issue
Block a user