aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-08-19 22:12:41 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-08-19 22:12:41 +0000
commit33509cc81ec5f2ba44eb6fd98bd5c1b5873e46bd (patch)
tree2c98b5c01eb583cf920fd9191282753052fd8b61 /file.c
parentRevert "Fix uninitialised values for <i> and <dd>" (diff)
downloadw3m-33509cc81ec5f2ba44eb6fd98bd5c1b5873e46bd.tar.gz
w3m-33509cc81ec5f2ba44eb6fd98bd5c1b5873e46bd.zip
Fix uninitialised values for <i> and <dd>
Bug-Debian: https://github.com/tats/w3m/issues/16
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/file.c b/file.c
index de916bc..b66f8c8 100644
--- a/file.c
+++ b/file.c
@@ -4686,6 +4686,12 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
case HTML_DD:
CLOSE_A;
CLOSE_DT;
+ if (h_env->envc == 0 ||
+ (h_env->envc_real < h_env->nenv &&
+ envs[h_env->envc].env != HTML_DL &&
+ envs[h_env->envc].env != HTML_DL_COMPACT)) {
+ PUSH_ENV(HTML_DL);
+ }
if (envs[h_env->envc].env == HTML_DL_COMPACT) {
if (obuf->pos > envs[h_env->envc].indent)
flushline(h_env, obuf, envs[h_env->envc].indent, 0,