mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Fix some undefined behavior (#209)
* Fix some undefined behavior
* Avoid overflow in line simplification calculations
* Oops, missed a test
* Didn't mean to add that to the Makefile
* Revert "Revert "[ci] test in debug mode (#202)""
This reverts commit c95c328e47.
* Fix reference to out-of-scope pointer
* Fix invalid shift and out-of-bounds vector element reference
* Update changelog and version
This commit is contained in:
+2
-1
@@ -562,7 +562,8 @@ struct tileset_reader {
|
||||
zoom++;
|
||||
overzoomed_tiles.clear();
|
||||
|
||||
long long scale = (1LL << zoom) / (1LL << maxzoom_so_far);
|
||||
// +1 because maxzoom_so_far is initially -1, an invalid shift
|
||||
long long scale = (1LL << (zoom + 1)) / (1LL << (maxzoom_so_far + 1));
|
||||
|
||||
// If this is the first overzoomed level, we don't know yet
|
||||
// which tiles will be useful, so spell out all 4 child tiles
|
||||
|
||||
Reference in New Issue
Block a user