Commit Diff


commit - aacb022e55c43b391e65272f5c5fdd4393dadbec
commit + 166712b48fda2e0971a5317f5bb90a694d155f65
blob - 6062df3edff54d64e0b131bf27d583583bccfc85
blob + 785a759348d324ef376f1ece3a0daf32115351da
--- wrap.c
+++ wrap.c
@@ -177,12 +177,13 @@ hardwrap_text(struct tab *tab, struct line *l, size_t 
 	int		 cont;
 	const char	*linestart;
 
+	off = 0;
+	linestart = l->line;
+
 	if (l->line == NULL)
 		return emitline(tab, 0, &off, l, &linestart, &cont);
 
-        len = strlen(l->line);
-	off = 0;
-	linestart = l->line;
+	len = strlen(l->line);
 
 	while (len >= width) {
 		len -= width-1;