From 350f6aa2fd34469fbd8f270f8f840542b2c24374 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Tue, 17 Nov 2015 11:13:08 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- 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 9c8b9e952..db1460a5c 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; -- cgit v1.2.3-70-g09d2