Revision 43271130

View differences:

som/ChunkIDSet/chunkids_encoding.c
43 43
        {
44 44
            int elements;
45 45
            uint32_t c_min, c_max;
46
            c_min = c_max = h->elements[i++];
47
            for (; i < h->n_elements; i++) {
46
            c_min = c_max = h->n_elements ? h->elements[0] : 0;
47
            for (i = 1; i < h->n_elements; i++) {
48 48
                if (h->elements[i] < c_min)
49 49
                    c_min = h->elements[i];
50 50
                else if (h->elements[i] > c_max)

Also available in: Unified diff