aboutsummaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/parse-xml.c b/parse-xml.c
index f62ce9891..15138f43e 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1045,15 +1045,11 @@ static int uddf_dive_match(struct dive **divep, const char *name, int len, char
static void gps_location(char *buffer, void *_dive)
{
- int i;
+ char *end;
struct dive *dive = _dive;
- double latitude, longitude;
- i = sscanf(buffer, "%lf %lf", &latitude, &longitude);
- if (i == 2) {
- dive->latitude = latitude;
- dive->longitude = longitude;
- }
+ dive->latitude = g_ascii_strtod(buffer, &end);
+ dive->longitude = g_ascii_strtod(end, &end);
free(buffer);
}