pivot-table: Fix type mismatch in equal_indexes().
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:22:24 +0000 (14:22 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:50:07 +0000 (14:50 -0800)
This function was being called with an 'unsigned int *' but it took it
as a 'size_t *', which worked fine on 32-bit systems but caused an
enormous number of tests to fail on 64-bit systems.

Thanks to Alan Mead and John Darrington for assistance.

Fixes: 5cab4cf3322f ("output: Introduce pivot tables.")
src/output/pivot-table.c

index 0b4f0fb4bab85cb0a58348e86058dc6dee71ec35..c024f142ee8917637e98ef53013b8222902d1e6e 100644 (file)
@@ -810,7 +810,7 @@ pivot_cell_hash_indexes (const size_t *indexes, size_t n_idx)
 }
 
 static bool
-equal_indexes (const size_t *a, const size_t *b, size_t n)
+equal_indexes (const size_t *a, const unsigned int *b, size_t n)
 {
   for (size_t i = 0; i < n; i++)
     if (a[i] != b[i])