From c9039fc27916c03e21ba91365d01e6bc49503053 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Thu, 1 Jul 2021 15:17:17 +0200 Subject: layout: Fix overlap-check routine Fixes a regression introduced by commit 06a89d713 (layout: Introduce layout_next()). A negation was dropped by accident which resulted in comparisons with later, not-included regions instead of included ones. Change-Id: I18168b9bd9a7d0fe2ba04fb091d1600f65d6dd5b Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/55997 Tested-by: build bot (Jenkins) Reviewed-by: Anastasia Klimchuk Reviewed-by: Edward O'Callaghan Reviewed-by: Angel Pons --- layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layout.c') diff --git a/layout.c b/layout.c index e688f794a..36aa247de 100644 --- a/layout.c +++ b/layout.c @@ -257,7 +257,7 @@ int included_regions_overlap(const struct flashrom_layout *const l) const struct romentry *rhs = lhs; while ((rhs = layout_next(l, rhs))) { - if (rhs->included) + if (!rhs->included) continue; if (lhs->start > rhs->end) -- cgit v1.2.3