diff --git a/include/retdec/common/range.h b/include/retdec/common/range.h index 342b6f250..d9457c534 100644 --- a/include/retdec/common/range.h +++ b/include/retdec/common/range.h @@ -428,12 +428,9 @@ class RangeContainer { --pos; // Move to previous no matter what. } - while (pos != _ranges.end() && pos->getStart() <= r.getEnd()) + while (pos != _ranges.end() && pos->getStart() < r.getEnd()) { - if (pos->contains(r.getStart()) - || pos->contains(r.getEnd()) - || r.contains(pos->getStart()) - || r.contains(pos->getEnd())) + if (r.getStart() < pos->getEnd()) { RangeType old = *pos;