Commit 0ddc6618 authored by Leonid Beynenson's avatar Leonid Beynenson

Fixed bug in the operator of cv::Ranges-s intersection (operator &).

parent bee4c347
......@@ -2000,7 +2000,7 @@ static inline bool operator !(const Range& r)
static inline Range operator & (const Range& r1, const Range& r2)
{
Range r(std::max(r1.start, r2.start), std::min(r2.start, r2.end));
Range r(std::max(r1.start, r2.start), std::min(r1.end, r2.end));
r.end = std::max(r.end, r.start);
return r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment