From: Jason Stover Date: Wed, 19 Apr 2006 14:11:35 +0000 (+0000) Subject: fixed look up of the number of variables X-Git-Tag: sav-api~1973 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91d578f595e4170576edad6f0e0901beb6b085d9;p=pspp fixed look up of the number of variables --- diff --git a/src/language/stats/ChangeLog b/src/language/stats/ChangeLog index 0056baaa1c..cb7aad19bb 100644 --- a/src/language/stats/ChangeLog +++ b/src/language/stats/ChangeLog @@ -1,3 +1,8 @@ +2006-04-19 Jason Stover + + * regression.q (regression_trns_proc): Fixed the look-up of the + number of variables. + 2006-04-18 Jason Stover * regression.q (regression_trns_proc): Look up the residual diff --git a/src/language/stats/regression.q b/src/language/stats/regression.q index 49ea241879..5882281264 100644 --- a/src/language/stats/regression.q +++ b/src/language/stats/regression.q @@ -516,14 +516,15 @@ regression_trns_proc (void *m, struct ccase *c, int case_idx UNUSED) assert (model->depvar != NULL); assert (model->resid != NULL); - vals = xnmalloc (n_variables, sizeof (*vals)); dict_get_vars (default_dict, &vars, &n_vars, 1u << DC_ORDINARY); + vals = xnmalloc (n_vars, sizeof (*vals)); + assert (vals != NULL); output = case_data_rw (c, model->resid->fv); assert (output != NULL); for (i = 0; i < n_vars; i++) { - /* Do not use the residual variable as a predictor. */ + /* Do not use the residual variable. */ if (vars[i]->index != model->resid->index) { /* Do not use the dependent variable as a predictor. */