summaryrefslogtreecommitdiff
path: root/navit/country.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/country.c')
-rw-r--r--navit/country.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/navit/country.c b/navit/country.c
index 52f471e17..7d13e69e7 100644
--- a/navit/country.c
+++ b/navit/country.c
@@ -362,9 +362,10 @@ country_search_new(struct attr *search, int partial)
{
struct country_search *ret=g_new(struct country_search, 1);
ret->search=*search;
- ret->search.u.str=linguistics_casefold(ret->search.u.str);
- if (search->type != attr_country_id)
+ if (search->type != attr_country_id) {
+ ret->search.u.str=linguistics_casefold(ret->search.u.str);
ret->len=strlen(ret->search.u.str);
+ }
else
ret->len=0;
ret->partial=partial;