Fix bug when positive and negative groups are of different lengths
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 10 Jun 2009 13:50:48 +0000 (21:50 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 10 Jun 2009 13:50:48 +0000 (21:50 +0800)
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;
            }