From 9978bc7700f2b222626586f6abe9c498e870dbcf Mon Sep 17 00:00:00 2001 From: John Darrington Date: Fri, 1 Jul 2011 16:48:19 +0200 Subject: [PATCH] Fix bug parsing T-TEST --- src/language/stats/t-test-parser.c | 8 ++++++++ src/language/stats/t-test.h | 1 + 2 files changed, 9 insertions(+) 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, -- 2.30.2