X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Foneway.c;h=791ee86978dabe586e1d41ae6bf2d01f968de094;hb=c84078d8498785e9a52945cc63fb663cd48027af;hp=f2214e49e2bd273b2ca1c4fee673f58229071d65;hpb=1e0e76eaeb51ef0c15fdcfc4bd12d9310c16a88b;p=pspp diff --git a/src/language/stats/oneway.c b/src/language/stats/oneway.c index f2214e49e2..791ee86978 100644 --- a/src/language/stats/oneway.c +++ b/src/language/stats/oneway.c @@ -450,9 +450,12 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds) PV_NO_DUPLICATE | PV_NUMERIC)) goto error; - lex_force_match (lexer, T_BY); + if (!lex_force_match (lexer, T_BY)) + goto error; oneway.indep_var = parse_variable_const (lexer, dict); + if (oneway.indep_var == NULL) + goto error; while (lex_token (lexer) != T_ENDCMD) { @@ -502,7 +505,8 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds) { if ( !lex_force_match (lexer, T_LPAREN)) goto error; - lex_force_num (lexer); + if (! lex_force_num (lexer)) + goto error; oneway.alpha = lex_number (lexer); lex_get (lexer); if ( !lex_force_match (lexer, T_RPAREN)) @@ -543,6 +547,9 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds) goto error; } } + + if ( ll_count (coefficient_list) <= 0) + goto error; ll_push_tail (&oneway.contrast_list, &cl->ll); } @@ -1387,6 +1394,8 @@ show_contrast_tests (const struct oneway_spec *cmd, const struct oneway_workspac { const struct per_var_ws *pvw = &ws->vws[v]; const struct categoricals *cats = covariance_get_categoricals (pvw->cov); + if (!categoricals_is_complete (cats)) + continue; struct ll *cli; int i = 0; int lines_per_variable = 2 * n_contrasts;