From 0fdf2f9021c12ccdf06e964a64d1155a265316d9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 5 Apr 2014 21:18:19 +0000 Subject: bugfix: make sure all variables are properly initialized when rendering .ll (line length) requests. oops. --- term.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index a8f2d3f0..300376e0 100644 --- a/term.c +++ b/term.c @@ -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); } -- cgit