diff --git a/src/ui/util/net/ip4range.cpp b/src/ui/util/net/ip4range.cpp index 0d23b411..04054c3a 100644 --- a/src/ui/util/net/ip4range.cpp +++ b/src/ui/util/net/ip4range.cpp @@ -70,11 +70,13 @@ bool Ip4Range::fromText(const QString &text) text.splitRef(QLatin1Char('\n'))) { ++lineNo; - if (line.isEmpty()) + const QStringRef lineTrimmed = line.trimmed(); + if (lineTrimmed.isEmpty() + || lineTrimmed.startsWith('#')) // commented line continue; quint32 from, to; - if (!parseAddressMask(line, from, to)) { + if (!parseAddressMask(lineTrimmed, from, to)) { setErrorLineNo(lineNo); return false; }