Do not parse METARs that are obvious html based error messages

This commit is contained in:
Roland Rossgotterer
2019-02-15 16:12:28 +01:00
committed by Mat Sutcliffe
parent 97b6131104
commit 20131d0b8e

View File

@@ -127,6 +127,8 @@ namespace BlackCore
{
if (!this->doWorkCheck()) { return; }
const QString line = lineReader.readLine();
// some check for obvious errors
if (line.contains("<html")) { continue; }
const CMetar metar = m_metarDecoder.decode(line);
if (metar != CMetar()) { metars.push_back(metar); }
else { invalidLines++; }