summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/navigation/nav_map.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index 8b7274d673..737ccaf3cd 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -1060,7 +1060,8 @@ void NavMap::sync() {
}
// Update the update ID.
- map_update_id = (map_update_id + 1) % 9999999;
+ // Some code treats 0 as a failure case, so we avoid returning 0.
+ map_update_id = map_update_id % 9999999 + 1;
}
// Do we have modified obstacle positions?