From b69af4d7836c24dfc9fb6da50f13dc1fd56ba6ba Mon Sep 17 00:00:00 2001 From: "U. Bruhin" Date: Wed, 29 Apr 2026 09:30:41 +0200 Subject: [PATCH] DomElement: Throw std::runtime_error if data is not XML Sanity check to catch project files from Eagle v5 or older, which were binary and thus not supported by this parser. --- parseagle/common/domelement.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/parseagle/common/domelement.cpp b/parseagle/common/domelement.cpp index c9a05aa..20e9b43 100644 --- a/parseagle/common/domelement.cpp +++ b/parseagle/common/domelement.cpp @@ -60,6 +60,16 @@ DomElement DomElement::parse(const QByteArray& data) DomElement DomElement::parseDocument(QByteArray data) { + // Sanity check that no Eagle v5 (binary) project is imported. To avoid + // false-positives, we test for several patterns. + if ((!data.contains("