mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-22 04:18:01 +00:00
Guard against potentially rounding to 0 when choosing sorting unit
This commit is contained in:
parent
1b68dcdc22
commit
9c1f2b2123
3
main.cpp
3
main.cpp
@ -708,6 +708,9 @@ void radix1(int *geomfds_in, int *indexfds_in, int inputs, int prefix, int split
|
|||||||
unit = max_unit;
|
unit = max_unit;
|
||||||
}
|
}
|
||||||
unit = ((unit + page - 1) / page) * page;
|
unit = ((unit + page - 1) / page) * page;
|
||||||
|
if (unit < page) {
|
||||||
|
unit = page;
|
||||||
|
}
|
||||||
|
|
||||||
size_t nmerges = (indexpos + unit - 1) / unit;
|
size_t nmerges = (indexpos + unit - 1) / unit;
|
||||||
struct mergelist merges[nmerges];
|
struct mergelist merges[nmerges];
|
||||||
|
Loading…
Reference in New Issue
Block a user