From 690f60f3e38041a06a72fa524a7d0a6970cf640a Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 13 Sep 2022 21:21:05 -0500 Subject: [PATCH] Sometimes level 3 records aren't found by time, ensure a best-effort is always selected --- wxdata/include/scwx/util/map.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wxdata/include/scwx/util/map.hpp b/wxdata/include/scwx/util/map.hpp index e60000ba..9aa2b6f0 100644 --- a/wxdata/include/scwx/util/map.hpp +++ b/wxdata/include/scwx/util/map.hpp @@ -26,6 +26,11 @@ ReturnType GetBoundedElement(std::map& map, Key key) // looking for element = (--it)->second; } + else + { + // The current element is a good substitute + element = it->second; + } } else if (map.size() > 0) {