spv-legacy-decoder: Set data_index and presentation_index in leaves.
[pspp] / src / output / spv / spv-legacy-decoder.c
index b8005de5be890d3412c39090f68c557f58c44a0f..78b1780b1748b5a3a2fdca15c06d19dd3c810b89 100644 (file)
@@ -1272,6 +1272,11 @@ add_dimension (struct spv_series **series, size_t n,
   /* Now drop unnamed 1-category groups and add parent pointers. */
   for (size_t j = 0; j < n_cats; j++)
     add_parents (cats[j], d->root, j);
+  for (size_t j = 0; j < d->n_leaves; j++)
+    {
+      d->data_leaves[j]->data_index = j;
+      d->presentation_leaves[j]->presentation_index = j;
+    }
 
   d->root->subs = cats;
   d->root->n_subs = n_cats;