fix(rendering): prevent corrupted small files rendering (#55)

This commit is contained in:
Aram Drevekenin
2020-06-26 17:18:20 +02:00
committed by GitHub
parent e525cdd1aa
commit 628a6e3be9

View File

@@ -99,6 +99,10 @@ impl TreeMap {
}
}
fn add_unrenderable_tile(&mut self, tile: &Tile) {
if tile.width == 0 || tile.height == 0 {
// this is a rounding error, do not add it
return;
}
match self.unrenderable_tile_coordinates {
Some((x, y)) => {
let x = if tile.x < x { tile.x } else { x };