mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Ignore geolookups without value
It seems that geolookups might return null for some values. This will result in corrupted XML as show_utf8 does not terminate the current tag if t->value is empty. So let's just skip the geo data that is missing the value. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c0ac73a478
commit
e500a9dea8
1 changed files with 1 additions and 1 deletions
|
@ -555,7 +555,7 @@ void save_dives_buffer(struct membuffer *b, const bool select_only)
|
|||
if (ds->taxonomy.nr) {
|
||||
for (int j = 0; j < ds->taxonomy.nr; j++) {
|
||||
struct taxonomy *t = &ds->taxonomy.category[j];
|
||||
if (t->category != TC_NONE) {
|
||||
if (t->category != TC_NONE && t->value) {
|
||||
put_format(b, " <geo cat='%d'", t->category);
|
||||
put_format(b, " origin='%d'", t->origin);
|
||||
show_utf8(b, t->value, " value='", "'/>\n", 1);
|
||||
|
|
Loading…
Reference in a new issue