Clarify confusing category stuff.
[pspp] / dump.c
diff --git a/dump.c b/dump.c
index 830a5dac1dc3714ea57c2b5429651ff560d66b67..e37202000c64f310a309f872ccbbd0ae2f46cc96 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -580,17 +580,16 @@ dump_category(int level, int *indexes, int *n_indexes, int max_indexes)
   match_byte(0);
   match_byte(0);
 
-  if (match_u32 (1))
-    match_byte (0);
-  else if (match_byte (1))
+  if (match_byte (1))
     {
-      match_byte (0);
-      if (!match_u32 (2))
-        match_u32_assert (1);
-      match_byte (0);
+      if (!match_byte (0) && !match_byte (1))
+        match_byte_assert (2);
     }
-  else if (!match_u32(2))
-    match_u32_assert (0);
+  else if (!match_byte (2))
+    match_byte_assert (0);
+  match_byte_assert (0);
+  match_byte_assert (0);
+  match_byte_assert (0);
 
   int indx = get_u32();
   int n_categories = get_u32();
@@ -629,7 +628,7 @@ dump_dim(int indx)
   printf ("<dimension index=\"%d\">\n", indx);
   dump_value (stdout, 0);
 
-  /* This byte is usually 0x02 but many other values have been spotted. */
+  /* This byte is usually 0 but many other values have been spotted. */
   pos++;
 
   if (!match_byte(0) && !match_byte(1))