Commit d7181242 authored by LaurentBerger's avatar LaurentBerger

Solves issue 12392

parent c7cf8fb3
...@@ -584,6 +584,11 @@ void RNG::fill( InputOutputArray _mat, int disttype, ...@@ -584,6 +584,11 @@ void RNG::fill( InputOutputArray _mat, int disttype,
} }
ip[j][1] = cvCeil(a); ip[j][1] = cvCeil(a);
int idiff = ip[j][0] = cvFloor(b) - ip[j][1] - 1; int idiff = ip[j][0] = cvFloor(b) - ip[j][1] - 1;
if (idiff < 0)
{
idiff = 0;
ip[j][0] = 0;
}
double diff = b - a; double diff = b - a;
fast_int_mode = fast_int_mode && diff <= 4294967296. && (idiff & (idiff+1)) == 0; fast_int_mode = fast_int_mode && diff <= 4294967296. && (idiff & (idiff+1)) == 0;
......
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