Fixed crash with EXAMINE vs. SPLIT
authorJohn Darrington <john@darrington.wattle.id.au>
Wed, 24 Apr 2013 18:30:48 +0000 (20:30 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Wed, 24 Apr 2013 18:30:48 +0000 (20:30 +0200)
Partial fix for bug #38820

src/language/stats/examine.c
tests/language/dictionary/split-file.at

index e4acc6c9da01ed7440fed9ab81d269223c4aa5b0..ea1b5dba19d3ba23fe83674605f41bca9dee621f 100644 (file)
@@ -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);
 
index 710907ccec80c06e450cf6737c33a3ba776cf753..4ffd71e5a5e0150bd82cb41ce8f3de4395e1ae2f 100644 (file)
@@ -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.