Skip to content

Commit

Permalink
fix segfault as per tessarin#1
Browse files Browse the repository at this point in the history
  • Loading branch information
7890 committed May 13, 2021
1 parent 01efa54 commit 9346064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MCQuantization.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ MCQuantizeData(MCTriplet *data, mc_uint_t size, mc_byte_t level)

/* find new cube data sizes */
mc_uint_t newSize = 0;
while (parentCube->data[newSize].value[dim] <= median)
while (parentCube->data[newSize].value[dim] < median)
newSize++;
/* newSize is now the index of the first element above the
* median, thus it is also the count of elements below the median */
Expand Down

0 comments on commit 9346064

Please sign in to comment.