Fix a bug that disallowed a per-feature minzoom of 0

This commit is contained in:
Eric Fischer
2019-01-16 11:56:25 -08:00
parent 454ae96242
commit 6da2090960
5 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ std::string truncate16(std::string const &s, size_t runes) {
int integer_zoom(std::string where, std::string text) {
double d = atof(text.c_str());
if (!isnormal(d) || d != floor(d) || d < 0 || d > 32) {
if (!isfinite(d) || d != floor(d) || d < 0 || d > 32) {
fprintf(stderr, "%s: Expected integer zoom level in \"tippecanoe\" GeoJSON extension, not %s\n", where.c_str(), text.c_str());
exit(EXIT_FAILURE);
}