Re-added Data->Insert_Variable menu item
[pspp-builds.git] / src / math / linreg / linreg.c
index c717e4ada4bd690ea7b0938f6c1289525cb24542..9224cc6bad9332769a8797b783719d235a2cbb82 100644 (file)
@@ -18,6 +18,7 @@
   Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
  */
 
+#include <config.h>
 #include <gsl/gsl_fit.h>
 #include <gsl/gsl_multifit.h>
 
@@ -123,7 +124,7 @@ pspp_linreg_get_vars (const void *c_, struct variable **v)
       /* Repeated variables are likely to bunch together, at the end
          of the array. */
       i = result - 1;
-      while (i >= 0 && (v[i]->index != tmp->index))
+      while (i >= 0 && v[i] != tmp)
        {
          i--;
        }