From a57668127eb0e00bc467ae0fc487592e95c17227 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 4 Sep 2011 09:50:31 -0700 Subject: [PATCH] Oops. I forgot to 'fclose()' the file after saving the xml It never actually triggered anything for me, but any buffered data might be lost, especially if you force-exit the application after saving a dive log. This probably explains a corrupted (truncated) dive file report from Nathan Samson. Reported-by: Nathan Samson Signed-off-by: Linus Torvalds --- save-xml.c | 1 + 1 file changed, 1 insertion(+) diff --git a/save-xml.c b/save-xml.c index 9e3640c..5c05723 100644 --- a/save-xml.c +++ b/save-xml.c @@ -193,4 +193,5 @@ void save_dives(const char *filename) for (i = 0; i < dive_table.nr; i++) save_dive(f, get_dive(i)); fprintf(f, "\n"); + fclose(f); } -- 2.45.2