summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdata/services/freebase/gdata-freebase-search-query.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdata/services/freebase/gdata-freebase-search-query.c b/gdata/services/freebase/gdata-freebase-search-query.c
index 4d6badb4..4c666fd2 100644
--- a/gdata/services/freebase/gdata-freebase-search-query.c
+++ b/gdata/services/freebase/gdata-freebase-search-query.c
@@ -246,9 +246,15 @@ build_filter_string (FilterNode *node,
break;
}
case NODE_LOCATION:
- g_string_append_printf (str, "(within radius:%" G_GUINT64_FORMAT "m lon:%.4f lat:%.4f)",
- node->location.radius, node->location.lon, node->location.lat);
+ {
+ gchar lon_str[G_ASCII_DTOSTR_BUF_SIZE], lat_str[G_ASCII_DTOSTR_BUF_SIZE];
+
+ g_ascii_formatd (lon_str, G_ASCII_DTOSTR_BUF_SIZE, "%.4f", node->location.lon);
+ g_ascii_formatd (lat_str, G_ASCII_DTOSTR_BUF_SIZE, "%.4f", node->location.lat);
+ g_string_append_printf (str, "(within radius:%" G_GUINT64_FORMAT "m lon:%s lat:%s)",
+ node->location.radius, lon_str, lat_str);
break;
+ }
default:
g_assert_not_reached ();
break;