summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-11-17 11:13:08 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-24 09:20:40 -0800
commit350f6aa2fd34469fbd8f270f8f840542b2c24374 (patch)
tree6727c366f9b5e9878f809d2181552a9a481adcdb
parentfacaa3e0cd5f3f67fb9769f47a9ccd1e314ff51d (diff)
downloadsubsurface-350f6aa2fd34469fbd8f270f8f840542b2c24374.tar.gz
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 <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-core/planner.c3
1 files changed, 2 insertions, 1 deletions
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, "</tbody></table></div>");
+ if (!plan_verbatim)
+ len += snprintf(buffer + len, sz_buffer - len, "</tbody></table></div>");
dive->cns = 0;
dive->maxcns = 0;