Commit ce550441 authored by Paul's avatar Paul
Browse files

Check bounds

parent 7339860e
......@@ -80,7 +80,11 @@ struct index
}
else
{
repeat(max_stride_iterations(n, stride), [&](auto i) { f(start + stride * i); });
repeat(max_stride_iterations(n, stride), [&](auto k) {
auto i = start + stride * k;
if (i < n)
f(i);
});
}
}
else
......
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