summaryrefslogtreecommitdiffstats
path: root/core/plannernotes.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r--core/plannernotes.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 1773705b4..a2d4efa19 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -95,19 +95,23 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
free((void *)temp);
return;
} else if (diveplan->surface_interval >= 48 * 60 *60) {
+ const char *current_date = get_current_date();
len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %s</b><br>",
translate("gettextFromC", "Subsurface"),
subsurface_canonical_version(),
translate("gettextFromC", "dive plan</b> created on"),
- get_current_date());
+ current_date);
+ free((void *)current_date);
} else {
+ const char *current_date = get_current_date();
len += snprintf(buffer + len, sz_buffer - len, "<div><b>%s (%s) %s %d:%02d) %s %s<br>",
translate("gettextFromC", "Subsurface"),
subsurface_canonical_version(),
translate("gettextFromC", "dive plan</b> (surface interval "),
FRACTION(diveplan->surface_interval / 60, 60),
translate("gettextFromC", "created on"),
- get_current_date());
+ current_date);
+ free((void *)current_date);
}
if (prefs.display_variations && decoMode() != RECREATIONAL)