summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-19 15:38:36 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-01-21 08:26:59 +0100
commit9921fb4f2bba31093ef5168b274489500b96d238 (patch)
tree81c456f0fcef712c60f952443862ffb453609fb6 /src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
parentc549b13656fe7bde5536961f168f0f1a68ea3490 (diff)
downloadqtlocation-9921fb4f2bba31093ef5168b274489500b96d238.tar.gz
Fix OSM routing service. It sends route instructions with nine entries.
I have not been able to find documentation what the 9th entry represents but in 99% of all cases there is a 9th entry. Right new we don't need it though and the OSM plugin should be permissive of additional route instructions anyway. Change-Id: I9ef81bc9059de1b634e94705b76c7c9643153435 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/plugins/geoservices/osm/qgeoroutereplyosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qgeoroutereplyosm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp b/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
index f2647f3d..5641bfa4 100644
--- a/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
+++ b/src/plugins/geoservices/osm/qgeoroutereplyosm.cpp
@@ -274,7 +274,7 @@ static QGeoRoute constructRoute(const QByteArray &geometry, const QJsonArray &in
for (int i = instructions.count() - 1; i >= 0; --i) {
QJsonArray instruction = instructions.at(i).toArray();
- if (instruction.count() != 8) {
+ if (instruction.count() < 8) {
qWarning("Instruction does not contain enough fields.");
continue;
}