- fprintf ( f, "<wpt lat=\"%f\" lon=\"%f\"%s>\n",
- ll.lat, ll.lon, wp->visible ? "" : " hidden=\"hidden\"" );
+ s_lat = a_coords_dtostr( ll.lat );
+ s_lon = a_coords_dtostr( ll.lon );
+ fprintf ( f, "<wpt lat=\"%s\" lon=\"%s\"%s>\n",
+ s_lat, s_lon, wp->visible ? "" : " hidden=\"hidden\"" );
+ g_free ( s_lat );
+ g_free ( s_lon );