Fix bug when positive and negative groups are of different lengths
[pspp-builds.git] / src / language / stats / roc.c
index 054289f1d61ae0bf9e80acac13c88f85c8a86202..b3841634378f30503c5e614f3387faeb3c3d144d 100644 (file)
@@ -474,6 +474,8 @@ do_roc (struct cmd_roc *roc, struct casereader *input, struct dictionary *dict)
                case_unref (cneg);
 
              cneg = casereader_read (n_neg);
+             if ( ! cneg )
+               break;
              dneg = case_data_idx (cneg, VALUE)->f;
            }