mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-07 20:53:25 +00:00
Fix two bugs in taxonomy_set_country
The random coincidence that this code actually ended up working in my tests is weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
53b1b17f4f
commit
3278953f86
1 changed files with 3 additions and 1 deletions
|
@ -78,8 +78,10 @@ void taxonomy_set_country(struct taxonomy_data *t, const char *country, enum tax
|
||||||
fprintf(stderr, "Error adding country taxonomy\n");
|
fprintf(stderr, "Error adding country taxonomy\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
idx = ++t->nr;
|
idx = t->nr++;
|
||||||
}
|
}
|
||||||
t->category[idx].value = country;
|
t->category[idx].value = country;
|
||||||
t->category[idx].origin = origin;
|
t->category[idx].origin = origin;
|
||||||
|
t->category[idx].category = TC_COUNTRY;
|
||||||
|
fprintf(stderr, "%s: set the taxonomy country to %s\n", __func__, country);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue