summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-01 08:29:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-01 08:29:43 -0800
commitc2e003975e4d11dbfda032a2d8e0386f75b3cde2 (patch)
tree1df64184fbb36a4050fe5d7492feda9347c4cd13
parentd720e133d84d6d468ffab48698d5105849f7d14c (diff)
downloadsubsurface-c2e003975e4d11dbfda032a2d8e0386f75b3cde2.tar.gz
Clear divecomputer saved status before saving the nicknames to XML
In commit c7169bd24f22 "Fix nickname saving in XML file to deal with utf8 characters" I added the helper function to clear the "this divecomputer has already been saved"-flag. But then forgot to call it from save_dives before saving the divecomputer nicknames. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--save-xml.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/save-xml.c b/save-xml.c
index fe663f652..0626d0adc 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -522,6 +522,9 @@ void save_dives(const char *filename)
update_dive(current_dive);
fprintf(f, "<divelog program='subsurface' version='%d'>\n<settings>\n", VERSION);
+
+ /* save the dive computer nicknames, if any */
+ clear_dc_saved_status();
for_each_dive(i, dive) {
struct divecomputer *dc = &dive->dc;
while (dc) {