Skip to content

Commit

Permalink
Prevent negative indent value in feed_table_block_tag()
Browse files Browse the repository at this point in the history
Bug-Debian: #88
  • Loading branch information
tats committed Jan 20, 2018
1 parent 707fb45 commit 8354763
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions table.c
Original file line number Diff line number Diff line change
Expand Up @@ -2356,10 +2356,14 @@ feed_table_block_tag(struct table *tbl,
if (mode->indent_level < MAX_INDENT_LEVEL)
tbl->indent -= INDENT_INCR;
}
if (tbl->indent < 0)
tbl->indent = 0;
offset = tbl->indent;
if (cmd == HTML_DT) {
if (mode->indent_level > 0 && mode->indent_level <= MAX_INDENT_LEVEL)
offset -= INDENT_INCR;
if (offset < 0)
offset = 0;
}
if (tbl->indent > 0) {
check_minimum0(tbl, 0);
Expand Down

0 comments on commit 8354763

Please sign in to comment.