summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--term.c10
1 files changed, 5 insertions, 5 deletions
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);
}