gpsbabel versions 1.5.0 through 1.5.4: geo.cc only handles integer terrain or difficulty

Bug #1761362 reported by Rick Richardson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gpsbabel (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

See http://geo.rkkda.com/forum/read.php?8,1069 for details.

It used to work in 1.4.4, before the "C" language gpsbabel got refactored into "C++" language gpsbabel.

Basically, the floating point does not work if the decimal part is non-zero. E.G. 3.0 goes to 3.0, but 3.5 goes to 0.0!

$ cd gpsbabel

$ diff -u geo.cc.org geo.cc
--- geo.cc.org 2017-10-14 20:54:31.228998156 -0500
+++ geo.cc 2017-10-14 20:55:48.450485105 -0500
@@ -74,9 +74,9 @@
         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());
       }

"Thanx for the fix, Rick. It's going into https://github.com/gpsbabel/gpsbabel/pull/93 " - Robert Lipe

Unfortunately, gpsbabel is still on 1.5.4, even after I reported this in October 14, 2017.

Fedora has fixed this:

https://bugzilla.redhat.com/show_bug.cgi?id=1561337

Revision history for this message
Rick Richardson (rick-richardson) wrote :

04/07/2018: Arch Linux has fixed it. https://bugs.archlinux.org/task/58115

Changed in gpsbabel (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.