Fix out-of-bounds error when no threads were needed for a zoom level

This commit is contained in:
Eric Fischer
2018-01-18 12:12:35 -08:00
parent eb966ae398
commit e07a4dd51b
4 changed files with 18 additions and 1 deletions
+3
View File
@@ -2363,6 +2363,9 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
if (threads >= (1U << 30)) {
threads = 1U << 30;
}
if (threads < 1) {
threads = 1;
}
// Assign temporary files to threads