mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Use the same serialization in both places, and add sanity checks
This commit is contained in:
+4
-1
@@ -31,7 +31,10 @@ drawvec decode_geometry(FILE *meta, long long *geompos, int z, unsigned tx, unsi
|
||||
while (1) {
|
||||
draw d;
|
||||
|
||||
deserialize_byte_io(meta, &d.op, geompos);
|
||||
if (!deserialize_byte_io(meta, &d.op, geompos)) {
|
||||
fprintf(stderr, "Internal error: Unexpected end of file in geometry\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (d.op == VT_END) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user