From aff4dc9408b26c8ae8b37b8069d33f3dacc5aa44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 29 May 2021 23:14:26 +0200 Subject: [PATCH] Fixed lat/lon error checks --- src/data/smlparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/smlparser.cpp b/src/data/smlparser.cpp index 9ceeff1a..0fb6a3d8 100644 --- a/src/data/smlparser.cpp +++ b/src/data/smlparser.cpp @@ -23,13 +23,13 @@ void SMLParser::sample(SegmentData &segment, QMap &map) while (_reader.readNextStartElement()) { if (_reader.name() == QLatin1String("Latitude")) { lat = _reader.readElementText().toDouble(&ok); - if (!ok || lat < -90 || lon > 90) { + if (!ok || lat < -90 || lat > 90) { _reader.raiseError("Invalid Latitude"); return; } } else if (_reader.name() == QLatin1String("Longitude")) { lon = _reader.readElementText().toDouble(&ok); - if (!ok || lat < -180 || lon > 180) { + if (!ok || lon < -180 || lon > 180) { _reader.raiseError("Invalid Longitude"); return; }