diff --git a/src/env_real.cpp b/src/env_real.cpp index 1bfcfdd..63d7933 100644 --- a/src/env_real.cpp +++ b/src/env_real.cpp @@ -263,6 +263,17 @@ void EnvReal::unset (std::string_view name) noexcept { } bool EnvReal::is_set (std::string_view name) const noexcept { + auto& pm = pointer_map(); + std::lock_guard lock(pm.env_mutex()); + + return duck::invoke_with_zstr( + name, + m_name_buff.get(), + m_name_buff_len, + [](const char* name, std::size_t) -> bool { + return nullptr == name; + } + ); } auto EnvReal::size() const noexcept -> size_type {