- match_byte(0);
- match_byte(0);
- match_byte(0);
- match_byte(0);
- if (data[pos] <= 5)
- dump_value__(0, false);
- else
- dump_substs (dump_data_value, level + 1);
-}
+ /* The next n_dims numbers are a permutation of the dimension numbers. */
+ int a[n_dims], b[n_dims];
+ for (int i = 0; i < n_dims; i++)
+ a[i] = b[i] = get_u32();
+ qsort(b, n_dims, sizeof *b, compare_int);
+ for (int i = 0; i < n_dims; i++)
+ if (b[i] != i)
+ {
+ fprintf(stderr, "bad dimension permutation:");
+ for (int i = 0; i < n_dims; i++)
+ fprintf(stderr, " %d", a[i]);
+ putc('\n', stderr);
+ exit(1);
+ }