Commit d473b4e492e89856bc4fea9aaea739bddd5c5e4b

Stefan Sperling 2019-08-10T00:49:10

fix merge bug inherited from OpenRCS, affecting lines with leading .

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/diff3.c b/lib/diff3.c
index a04f390..f9a22b0 100644
--- a/lib/diff3.c
+++ b/lib/diff3.c
@@ -541,7 +541,7 @@ ed_patch_lines(struct rcs_lines *dlines, struct rcs_lines *plines)
 				if (lp == NULL)
 					return -1;
 
-				if (!memcmp(lp->l_line, ".", 1))
+				if (lp->l_len == 2 && lp->l_line[0] == '.')
 					break;
 
 				TAILQ_REMOVE(&(plines->l_lines), lp, l_list);