:: commit 296b953b32b76a2e2ea8c03e78df3296f2448ad0

Mintsuki <mintsuki@protonmail.com> — 2026-02-07 08:06

parents: c5f61fb187

lib/elsewhere: Fix overlap check to detect full containment

diff --git a/common/lib/elsewhere.c b/common/lib/elsewhere.c
index 62bbeb67..58ab247b 100644
--- a/common/lib/elsewhere.c
+++ b/common/lib/elsewhere.c
@@ -7,8 +7,7 @@
 
 static bool elsewhere_overlap_check(uint64_t base1, uint64_t top1,
                               uint64_t base2, uint64_t top2) {
-    return ((base1 >= base2 && base1 <  top2)
-         || (top1  >  base2 && top1  <= top2));
+    return (base1 < top2 && base2 < top1);
 }
 
 bool elsewhere_append(
tab: 248 wrap: offon