[BugFix] fix the overlap check of zonemap (backport #62369) (#62411)

Signed-off-by: Murphy <96611012+murphyatwork@users.noreply.github.com>
Co-authored-by: Murphy <96611012+murphyatwork@users.noreply.github.com>
This commit is contained in:
mergify[bot] 2025-08-28 14:06:06 +08:00 committed by GitHub
parent b228bb67cc
commit 6ada019be0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -493,10 +493,8 @@ struct ZoneMapWrapper {
}
// For non-null zones, check value range overlap
return (other.zone_map.min_value.value >= zone_map.min_value.value &&
other.zone_map.min_value.value <= zone_map.max_value.value) ||
(other.zone_map.max_value.value >= zone_map.min_value.value &&
other.zone_map.max_value.value <= zone_map.max_value.value);
return std::max(zone_map.min_value.value, other.zone_map.min_value.value) <=
std::min(zone_map.max_value.value, other.zone_map.max_value.value);
}
};