make sure that makeDNSName parses "." correctly as root

This commit is contained in:
bert hubert 2018-10-15 09:28:36 +02:00
parent b2c9d5ea94
commit 022b1b2347

View File

@ -34,6 +34,9 @@ DNSName operator+(const DNSName& a, const DNSName& b)
DNSName makeDNSName(const std::string& str) DNSName makeDNSName(const std::string& str)
{ {
DNSName ret; DNSName ret;
if(str==".")
return ret;
string part; string part;
for(const auto& c: str) { for(const auto& c: str) {
if(c=='.') { if(c=='.') {