From 10e7ab1aed2469e25494eab59b1a3f1cd32d42b9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 7 Nov 2014 09:01:36 -0800 Subject: [PATCH] Tie down category counting a bit better. --- dump.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c index 3be7d5a9d6..63724092f3 100644 --- a/dump.c +++ b/dump.c @@ -327,9 +327,13 @@ dump_category(int level) else if (!match_u32(2)) match_u32_assert (0); - get_u32 (); - + int indx = get_u32(); int n_categories = get_u32(); + if (indx != -1 && n_categories != 0) + { + fprintf(stderr, "index not -1 but subcategories\n"); + exit(1); + } if (n_categories > 0) printf (", %d subcategories:", n_categories); printf("\n"); -- 2.30.2