From 88ac4ad982ae8429214f134497cafdb4c4b36822 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 17 Nov 2015 11:13:08 +0100 Subject: [PATCH] Only close html tags if they were opened before The runtime html table is printed only if printing a verbatim diveplan is disabled. So the closing tags should be printed only in that case. Signed-off-by: Robert C. Helling --- subsurface-core/planner.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsurface-core/planner.c b/subsurface-core/planner.c index 9c8b9e9..db1460a 100644 --- a/subsurface-core/planner.c +++ b/subsurface-core/planner.c @@ -776,7 +776,8 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool lastsetpoint = dp->setpoint; lastentered = dp->entered; } while ((dp = nextdp) != NULL); - len += snprintf(buffer + len, sz_buffer - len, ""); + if (!plan_verbatim) + len += snprintf(buffer + len, sz_buffer - len, ""); dive->cns = 0; dive->maxcns = 0; -- 2.4.9 (Apple Git-60)