From 451782ce2004871332662d0a7491c86eea08c9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 26 Feb 2025 07:44:33 +0100 Subject: [PATCH] Be more strict when parsing the TXT files --- src/data/txtparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/txtparser.cpp b/src/data/txtparser.cpp index f953d162..782a3e0f 100644 --- a/src/data/txtparser.cpp +++ b/src/data/txtparser.cpp @@ -40,14 +40,14 @@ bool TXTParser::parse(QFile *file, QList &tracks, _errorLine = csv.line() - 1; return false; } - } else if (entry.size() == 13) { + } else { if (!sg) { _errorString = "Missing start marker"; _errorLine = csv.line() - 1; return false; } - if (entry.at(1) == "A") { + if (entry.size() == 13 && entry.at(1) == "A") { Coordinates c(coordinates(entry)); if (!c.isValid()) { _errorString = "Invalid coordinates";