mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Guard against potentially rounding to 0 when choosing sorting unit
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user