regress: avoid undefined behavior in pointer arithmetic
This commit is contained in:
parent
c2ab1426e5
commit
f6e72a80e1
1 changed files with 1 additions and 1 deletions
|
@ -285,7 +285,7 @@ RGR_FindBestRegression
|
||||||
n - start <= min_samples) {
|
n - start <= min_samples) {
|
||||||
if (start != resid_start) {
|
if (start != resid_start) {
|
||||||
/* Ignore extra samples in returned nruns */
|
/* Ignore extra samples in returned nruns */
|
||||||
nruns = n_runs_from_residuals(resid - resid_start + start, n - start);
|
nruns = n_runs_from_residuals(resid + (start - resid_start), n - start);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue