Compare variable pointers instead of variable indexes.
[pspp-builds.git] / src / math / linreg / linreg.c
index c717e4ada4bd690ea7b0938f6c1289525cb24542..6bbd94c50cb8e742d6ec011d2a768d1685f6e47f 100644 (file)
@@ -123,7 +123,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--;
        }