Skip to content

Commit

Permalink
Only close html tags if they were opened before
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
atdotde authored and dirkhh committed Nov 24, 2015
1 parent facaa3e commit 350f6aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subsurface-core/planner.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 350f6aa

Please sign in to comment.