diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-24 14:43:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-24 14:44:29 -0800 |
commit | 67d8891af5ff98870f519a4282918ad2ebd4b3ff (patch) | |
tree | c2240641d46846742f1bee0a31022caab5cfc1d3 | |
parent | 51880785afcb80e5ccaa3fdd6a796c5e1622d44a (diff) | |
download | subsurface-67d8891af5ff98870f519a4282918ad2ebd4b3ff.tar.gz |
Slight change to the parser to avoid false posititives
The webservice output uses 'name' as the tag for the dive location. This
was added to the parser as unqualified tag and without this change
test24.xml was suddenly recognized as a dive (the parser was triggering on
the program 'name' attribute). Name should only be recognized as a dive
location if it is indeed a child of dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | parse-xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c index a4fb3a051..55b37a9c4 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1008,7 +1008,7 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf) return; if (MATCH(".location", utf8_string, &dive->location)) return; - if (MATCH(".name", utf8_string, &dive->location)) + if (MATCH("dive.name", utf8_string, &dive->location)) return; if (MATCH(".suit", utf8_string, &dive->suit)) return; |