spv-legacy-decoder: Set data_index and presentation_index in leaves.
[pspp] / src / output / pivot-table.c
index 5bcc6dc7ccc2ff5a170b53af99155b23d68461f9..01a4a859f159a93b6b70c2aed48123fa36985a3b 100644 (file)
@@ -988,7 +988,10 @@ clone_category (struct pivot_category *old,
 
   if (pivot_category_is_leaf (old))
     {
+      assert (new->data_index < new_dimension->n_leaves);
       new->dimension->data_leaves[new->data_index] = new;
+
+      assert (new->presentation_index < new_dimension->n_leaves);
       new->dimension->presentation_leaves[new->presentation_index] = new;
     }