diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-10-08 21:24:01 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-08 16:52:59 -0700 |
commit | e500a9dea87a9bb61e7b320bb1ae59206ae2fb8e (patch) | |
tree | d1bfe4b8d603a3f215db557ab1c95c3a90c9bf0c /save-xml.c | |
parent | c0ac73a478c5407467019d61ed2536bef90edd62 (diff) | |
download | subsurface-e500a9dea87a9bb61e7b320bb1ae59206ae2fb8e.tar.gz |
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>
Diffstat (limited to 'save-xml.c')
-rw-r--r-- | save-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/save-xml.c b/save-xml.c index 0fdb39091..166885861 100644 --- a/save-xml.c +++ b/save-xml.c @@ -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); |