code: plan9front

Download patch

ref: d2fc480bc214afaa88413c2ed4c0b40497bfc161
parent: 94fe005722a653158598a8e780ec4f9ebed71647
author: Ori Bernstein <ori@eigenstate.org>
date: Mon Jul 17 20:43:05 EDT 2023

merge3: overlap happens on the source offsets, not the dest offsets

--- a/sys/src/cmd/diff/merge3.c
+++ b/sys/src/cmd/diff/merge3.c
@@ -54,10 +54,10 @@
 {
 	if(l == nil || r == nil)
 		return 0;
-	if(l->a <= r->a)
-		return l->b >= r->a;
+	if(l->c <= r->c)
+		return l->d >= r->c;
 	else
-		return r->b >= l->a;
+		return r->d >= l->c;
 }
 
 char*