From: John Darrington Date: Fri, 1 Jul 2011 14:48:19 +0000 (+0200) Subject: Fix bug parsing T-TEST X-Git-Tag: v0.7.9~261 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9978bc7700f2b222626586f6abe9c498e870dbcf;p=pspp-builds.git Fix bug parsing T-TEST --- diff --git a/src/language/stats/t-test-parser.c b/src/language/stats/t-test-parser.c index 51f30b9c..7c8d8a54 100644 --- a/src/language/stats/t-test-parser.c +++ b/src/language/stats/t-test-parser.c @@ -68,6 +68,7 @@ cmd_t_test (struct lexer *lexer, struct dataset *ds) tt.missing_type = MISS_ANALYSIS; tt.n_vars = 0; tt.vars = NULL; + tt.mode = MODE_undef; lex_match (lexer, T_EQUALS); @@ -128,6 +129,13 @@ cmd_t_test (struct lexer *lexer, struct dataset *ds) { bool with = false; bool paired = false; + + if (tt.n_vars > 0) + { + msg (SE, _("VARIABLES subcommand may not be used with PAIRS.")); + goto parse_failed; + } + mode_count++; tt.mode = MODE_PAIRED; lex_match (lexer, T_EQUALS); diff --git a/src/language/stats/t-test.h b/src/language/stats/t-test.h index 2b4dba44..c2e80993 100644 --- a/src/language/stats/t-test.h +++ b/src/language/stats/t-test.h @@ -30,6 +30,7 @@ enum missing_type enum mode { + MODE_undef, MODE_PAIRED, MODE_INDEP, MODE_SINGLE,