ONEWAY: call categoricals_done only once
[pspp] / src / language / stats / reliability.c
index 5378ed897417494680e1603ae0379b396f27776d..744763382a374b815e9a235b9c86a18f82b0cc39 100644 (file)
@@ -263,6 +263,12 @@ cmd_reliability (struct lexer *lexer, struct dataset *ds)
       int i;
       const struct cronbach *s;
 
+      if ( reliability.split_point >= reliability.n_variables)
+        {
+          msg (ME, _("The split point must be less than the number of variables"));
+          goto error;
+        }
+
       reliability.n_sc += 2 ;
       reliability.sc = xrealloc (reliability.sc, sizeof (struct cronbach) * reliability.n_sc);