Make it an error, not a warning, to have missing coordinates for a point

This commit is contained in:
Eric Fischer
2018-11-26 14:50:45 -08:00
parent 506526ddfa
commit cf28e6b88b
4 changed files with 10 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
## 1.32.6
* Make it an error, not a warning, to have missing coordinates for a point
## 1.32.5 ## 1.32.5
* Use less memory on lines and polygons that are too small for the tile * Use less memory on lines and polygons that are too small for the tile
+4 -1
View File
@@ -1142,7 +1142,7 @@ drawvec stairstep(drawvec &geom, int z, int detail) {
for (size_t i = 0; i < geom.size(); i++) { for (size_t i = 0; i < geom.size(); i++) {
if (geom[i].op == VT_MOVETO) { if (geom[i].op == VT_MOVETO) {
out.push_back(geom[i]); out.push_back(geom[i]);
} else { } else if (out.size() > 0) {
long long x0 = out[out.size() - 1].x; long long x0 = out[out.size() - 1].x;
long long y0 = out[out.size() - 1].y; long long y0 = out[out.size() - 1].y;
long long x1 = geom[i].x; long long x1 = geom[i].x;
@@ -1202,6 +1202,9 @@ drawvec stairstep(drawvec &geom, int z, int detail) {
} }
// out.push_back(draw(VT_LINETO, xx, yy)); // out.push_back(draw(VT_LINETO, xx, yy));
} else {
fprintf(stderr, "Can't happen: stairstepping lineto with no moveto\n");
exit(EXIT_FAILURE);
} }
} }
+1
View File
@@ -86,6 +86,7 @@ void parse_geometry(int t, json_object *j, drawvec &out, int op, const char *fna
fprintf(stderr, "%s:%d: malformed point\n", fname, line); fprintf(stderr, "%s:%d: malformed point\n", fname, line);
json_context(j); json_context(j);
json_context(feature); json_context(feature);
exit(EXIT_FAILURE);
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
#ifndef VERSION_HPP #ifndef VERSION_HPP
#define VERSION_HPP #define VERSION_HPP
#define VERSION "v1.32.5" #define VERSION "v1.32.6"
#endif #endif