summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commonlib/region.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commonlib/region.c b/src/commonlib/region.c
index 541a125ad4..b5858f91c0 100644
--- a/src/commonlib/region.c
+++ b/src/commonlib/region.c
@@ -27,10 +27,10 @@ int region_is_subregion(const struct region *p, const struct region *c)
if (region_offset(c) < region_offset(p))
return 0;
- if (region_sz(c) > region_sz(p))
+ if (region_end(c) > region_end(p))
return 0;
- if (region_end(c) > region_end(p))
+ if (region_end(c) < region_offset(c))
return 0;
return 1;