From: Jason H Stover Date: Fri, 29 Jan 2010 19:25:09 +0000 (-0500) Subject: fixed counting of valid cases in fill_covariance X-Git-Tag: fc11-x64-build81^0 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e20fcdcb76eeb8a3f3ddc67da0000ff73d9e8ed;p=pspp-builds.git fixed counting of valid cases in fill_covariance --- diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index abb3bd35..2b31158d 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -821,22 +821,17 @@ fill_covariance (gsl_matrix *cov, struct covariance *all_cov, for (i = 0; i < n_all_vars; i++) { - for (j = k; j < n_vars; j++) + for (j = 0; j < n_vars; j++) { if (vars[j] == all_vars[i]) { - if (vars[j] != dep_var) - { - rows[j] = i; - } - else - { - dep_subscript = i; - } - k++; - break; + rows[j] = i; } } + if (all_vars[i] == dep_var) + { + dep_subscript = i; + } } for (i = 0; i < cov->size1 - 1; i++) {