shithub: neatroff

Download patch

ref: 3f23afabb528952a99b751ccc1ea7a7808b070df
parent: f08ca5dc1ee4183db88463bcf4c8e39071d1ef46
author: Ali Gholami Rudi <ali@rudi.ir>
date: Fri May 10 07:17:04 EDT 2013

adj: touch wb->els_* before wb_done()

wb_done() may reset els_pos and els_neg.

--- a/adj.c
+++ b/adj.c
@@ -106,11 +106,11 @@
 		sbuf_printf(s, "%ch'%du'", c_ec, a->gaps[i]);
 		sbuf_append(s, sbuf_buf(&cur->sbuf));
 		w += wb_wid(cur) + a->gaps[i];
-		wb_done(cur);
 		if (cur->els_neg < *els_neg)
 			*els_neg = cur->els_neg;
 		if (cur->els_pos > *els_pos)
 			*els_pos = cur->els_pos;
+		wb_done(cur);
 	}
 	if (!n)
 		return 0;