Fixed column/variable lookup
[pspp-builds.git] / src / cat.c
index 09cdebde5e3e1d03f7a208a0a089aeb55d6827c0..0dd9a014ad5cde729d7629ff1b975a9c6324fa21 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -354,6 +354,7 @@ design_matrix_create (int n_variables,
          tmp = &(dm->vars[col]);
          tmp->v = v;
          tmp->first_column = col;
+         tmp->last_column = col;
          col++;
        }
       else if (v->type == ALPHA)
@@ -399,7 +400,7 @@ design_matrix_col_to_var_index (const struct design_matrix *dm, size_t col)
 
 /*
   Return a pointer to the variable whose values
-  are stored in column col.
+  are stored in column col. BUG IN HERE
  */
 struct variable *
 design_matrix_col_to_var (const struct design_matrix *dm, size_t col)