From b537cdba68f3e4df8b71cd7e1c92c7b063a62f7c Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 2 May 2016 12:21:09 +0100 Subject: [PATCH] Second fix to e778b260c460c218a8efa27c178219cccf731452 to correct elevation output in GPX files. --- src/gpx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gpx.c b/src/gpx.c index 6ee2ffde..f11d7813 100644 --- a/src/gpx.c +++ b/src/gpx.c @@ -929,13 +929,12 @@ static void gpx_write_trackpoint ( VikTrackpoint *tp, GpxWritingContext *context if ( tp->altitude != VIK_DEFAULT_ALTITUDE ) { a_coords_dtostr_buffer ( tp->altitude, s_alt ); + fprintf ( f, " %s\n", s_alt ); } else if ( context->options != NULL && context->options->force_ele ) { - a_coords_dtostr_buffer ( 0, s_alt ); + fprintf ( f, " 0\n" ); } - if (s_alt != NULL) - fprintf ( f, " %s\n", s_alt ); time_iso8601 = NULL; if ( tp->has_timestamp ) { -- 2.39.5