From: John Darrington Date: Wed, 24 Apr 2013 18:30:48 +0000 (+0200) Subject: Fixed crash with EXAMINE vs. SPLIT X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfba1c409a4c698f17456783ec0a141a9b3d41de;p=pspp Fixed crash with EXAMINE vs. SPLIT Partial fix for bug #38820 --- diff --git a/src/language/stats/examine.c b/src/language/stats/examine.c index e4acc6c9da..ea1b5dba19 100644 --- a/src/language/stats/examine.c +++ b/src/language/stats/examine.c @@ -1527,7 +1527,7 @@ update_n (const void *aux1, void *aux2 UNUSED, void *user_data, int v; const struct examine *examine = aux1; struct exploratory_stats *es = user_data; - + for (v = 0; v < examine->n_dep_vars; v++) { struct ccase *outcase ; @@ -1801,12 +1801,10 @@ run_examine (struct examine *cmd, struct casereader *input) categoricals_set_payload (cmd->cats, &payload, cmd, NULL); - if (cmd->id_idx == -1) + if (cmd->id_var == NULL) { struct ccase *c = casereader_peek (input, 0); - assert (cmd->id_var == NULL); - cmd->id_idx = case_get_value_cnt (c); input = casereader_create_arithmetic_sequence (input, 1.0, 1.0); diff --git a/tests/language/dictionary/split-file.at b/tests/language/dictionary/split-file.at index 710907ccec..4ffd71e5a5 100644 --- a/tests/language/dictionary/split-file.at +++ b/tests/language/dictionary/split-file.at @@ -85,7 +85,7 @@ CROSSTABS a by b. CORRELATIONS /VARIABLES = a b. DELETE VARIABLES a. DESCRIPTIVES e . -* EXAMINE c by b. +EXAMINE c by b. EXPORT outfile='xxx'. FACTOR /VARIABLES = b c d. FILTER BY c.