From bb39d78be61e45555cdd87985e26ea07b725fabf Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 9 Apr 2020 15:18:04 +0100 Subject: Set the minimum length to 1 for most config items with a default. --- src/modules/m_hostchange.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/modules/m_hostchange.cpp') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 3529b6a4a..78ef68759 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -176,7 +176,9 @@ private: } } - const std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789"); + ConfigTag* tag = ServerInstance->Config->ConfValue("hostname"); + const std::string hmap = tag->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789", 1); + hostmap.reset(); for (std::string::const_iterator iter = hmap.begin(); iter != hmap.end(); ++iter) hostmap.set(static_cast(*iter)); -- cgit v1.3.1-10-gc9f91