void-packages/srcpkgs/gpsbabel/patches/correctly-read-diff-and-ter...

31 lines
1.1 KiB
Diff
Raw Normal View History

2018-12-21 20:36:33 +01:00
From 4cecea61aa5a33f4accfa109d0b73d7878462962 Mon Sep 17 00:00:00 2001
From: Robert Lipe <robertlipe@users.noreply.github.com>
Date: Sat, 14 Oct 2017 21:59:24 -0500
Subject: [PATCH 8/8] Correctly read diff and terr from geo format.
Thank you, Rick Richardson.
---
geo.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/geo.cc b/geo.cc
index 5c785f38..e6f4560a 100644
--- geo.cc
+++ geo.cc
@@ -74,9 +74,9 @@ void GeoReadLoc()
waypt_add_url(wpt,
reader.readElementText(), a.value("text").toString());
} else if (current_tag == "/loc/waypoint/difficulty") {
- wpt->gc_data->diff = reader.readElementText().toInt() * 10;
+ wpt->gc_data->diff = reader.readElementText().toDouble() * 10;
} else if (current_tag == "/loc/waypoint/terrain") {
- wpt->gc_data->terr = reader.readElementText().toInt() * 10;
+ wpt->gc_data->terr = reader.readElementText().toDouble() * 10;
} else if (current_tag == "/loc/waypoint/container") {
wpt->gc_data->container = wpt_container(reader.readElementText());
}
--
2.14.3