updated residual function; fixed bug in coefficient.c
[pspp-builds.git] / src / math / linreg / coefficient.c
index 4010b72d308b039bac804d60fe39c7fc30f923fd..5efde99e73fd22a7bd94d25281255fc1c224b100 100644 (file)
@@ -201,6 +201,8 @@ pspp_linreg_get_coeff (const pspp_linreg_cache * c,
       return NULL;
     }
 
+  result = c->coeff + i;
+  tmp = pspp_linreg_coeff_get_var (result, 0);
   while (tmp->index != v->index && i < c->n_coeffs)
     {
       result = c->coeff + i;