Commit Diff


commit - 4064588e9563c73b3a08166b9665a4c9b7c69ae1
commit + 3c7939fe2bc71876feb1b5c144e95c69f60d2763
blob - 899e70b054294423e8273fb0e275949925cc8909
blob + ecf2b8063ad69e00446caa86291e09ff43ca00ee
--- lib/diff3.c
+++ lib/diff3.c
@@ -1047,7 +1047,7 @@ edscript(int n, struct diff3_state *d3s)
 				goto done;
 		} else {
 			err = diff_output(d3s->diffbuf, "%s%s\n.\n",
-			    line[linelen] == '\n' ? ":" : "",
+			    linelen > 0 && line[linelen] == '\n' ? ":" : "",
 			    d3s->f3mark);
 			if (err)
 				goto done;