Skip to content

Commit 8354763

Browse files
committed
Prevent negative indent value in feed_table_block_tag()
Bug-Debian: #88
1 parent 707fb45 commit 8354763

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: table.c

+4
Original file line numberDiff line numberDiff line change
@@ -2356,10 +2356,14 @@ feed_table_block_tag(struct table *tbl,
23562356
if (mode->indent_level < MAX_INDENT_LEVEL)
23572357
tbl->indent -= INDENT_INCR;
23582358
}
2359+
if (tbl->indent < 0)
2360+
tbl->indent = 0;
23592361
offset = tbl->indent;
23602362
if (cmd == HTML_DT) {
23612363
if (mode->indent_level > 0 && mode->indent_level <= MAX_INDENT_LEVEL)
23622364
offset -= INDENT_INCR;
2365+
if (offset < 0)
2366+
offset = 0;
23632367
}
23642368
if (tbl->indent > 0) {
23652369
check_minimum0(tbl, 0);

0 commit comments

Comments
 (0)