diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-05 21:18:19 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-05 21:18:19 +0000 |
commit | 0fdf2f9021c12ccdf06e964a64d1155a265316d9 (patch) | |
tree | 01dd20ea99ffe1ddb4a70f0bfc21867bb48db720 /term.c | |
parent | a6e0e907b41152b48f9766f3cfd1adfdfa28963c (diff) | |
download | mandoc-0fdf2f9021c12ccdf06e964a64d1155a265316d9.tar.gz |
bugfix: make sure all variables are properly initialized
when rendering .ll (line length) requests. oops.
Diffstat (limited to 'term.c')
-rw-r--r-- | term.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -630,6 +630,8 @@ term_setwidth(struct termp *p, const char *wstr) size_t width; int iop; + iop = 0; + width = 0; if (NULL != wstr) { switch (*wstr) { case ('+'): @@ -641,15 +643,13 @@ term_setwidth(struct termp *p, const char *wstr) wstr++; break; default: - iop = 0; break; } - if ( ! a2roffsu(wstr, &su, SCALE_MAX)) { - wstr = NULL; + if (a2roffsu(wstr, &su, SCALE_MAX)) + width = term_hspan(p, &su); + else iop = 0; - } } - width = (NULL != wstr) ? term_hspan(p, &su) : 0; (*p->setwidth)(p, iop, width); } |