From 173f702ffa40d165fb5d049850a47af7caf8a151 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Fri, 22 May 2020 01:20:48 +0200 Subject: [PATCH] Warn about missing ':' in reader --- src/util/io/reader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/io/reader.cpp b/src/util/io/reader.cpp index b896feff..05ffca02 100644 --- a/src/util/io/reader.cpp +++ b/src/util/io/reader.cpp @@ -226,11 +226,16 @@ void Reader::readLine(bool in_string) { } key = canonical_name_form(trim(key)); if (pos == String::npos) { + if (!ignore_invalid && !in_string) { + warning(_("Missing ':' "), 0, false); + } value.clear(); } else { value = trim_left(substr(line, pos+1)); } - if (key.empty() && pos!=String::npos) key = _(" "); // we don't want an empty key if there was a colon + if (key.empty() && pos!=String::npos) { + key = _(" "); // we don't want an empty key if there was a colon + } } void Reader::unknownKey() {