Finish up with categories (for now).
[pspp] / dump.c
diff --git a/dump.c b/dump.c
index e9a068699e005fba3778c5597181c93d0f8a6d4a..70ecab632058cf56a7146983f0da940f1e3c09d5 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -579,10 +579,15 @@ dump_category(FILE *stream, int level, int *indexes, int *n_indexes, int max_ind
   int merge = data[pos];
   if (!match_byte(0))
     match_byte_assert (1);
+
   match_byte_assert (0);
+
   int unindexed = data[pos];
   if (!match_byte(0))
     match_byte_assert (1);
+
+  int x = get_u32 ();
+  pos -= 4;
   if (!match_u32 (0))
     match_u32_assert (2);
 
@@ -604,6 +609,11 @@ dump_category(FILE *stream, int level, int *indexes, int *n_indexes, int max_ind
           fprintf(stderr, "index not -1 but merged\n");
           exit(1);
         }
+      if (x != 2)
+        {
+          fprintf(stderr, "index not -1 but x != 2\n");
+          exit(1);
+        }
       if (n_categories != 0)
         {
           fprintf(stderr, "index not -1 but subcategories\n");