From c2e003975e4d11dbfda032a2d8e0386f75b3cde2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 1 Jan 2013 08:29:43 -0800 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- save-xml.c | 3 +++ 1 file changed, 3 insertions(+) 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, "\n\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) {