source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: bugfix: make sure all variables are properly initialized  when
@ 2014-04-05 21:18 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-04-05 21:18 UTC (permalink / raw)
  To: source

Log Message:
-----------
bugfix: make sure all variables are properly initialized 
when rendering .ll (line length) requests.  oops.

Modified Files:
--------------
    mdocml:
        term.c

Revision Data
-------------
Index: term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v
retrieving revision 1.219
retrieving revision 1.220
diff -Lterm.c -Lterm.c -u -p -r1.219 -r1.220
--- term.c
+++ term.c
@@ -630,6 +630,8 @@ term_setwidth(struct termp *p, const cha
 	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 cha
 			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);
 }
 
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-04-05 21:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-05 21:18 mdocml: bugfix: make sure all variables are properly initialized when schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).