Commit 8354763b authored by Tatsuya Kinoshita's avatar Tatsuya Kinoshita

Prevent negative indent value in feed_table_block_tag()

Bug-Debian: https://github.com/tats/w3m/issues/88
parent 707fb450
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment