1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Allow broken subdiv bounds produced by mkgmap

This commit is contained in:
Martin Tůma 2020-11-02 00:18:27 +01:00
parent 80f5bbfbce
commit 1225d350d4

View File

@ -206,7 +206,11 @@ bool TREFile::load(int idx)
qWarning("%s: invalid subdiv bounds (level %d; pos %f,%f; size %fx%f)", qWarning("%s: invalid subdiv bounds (level %d; pos %f,%f; size %fx%f)",
qPrintable(fileName()), level.level, toWGS24(lon), toWGS24(lat), qPrintable(fileName()), level.level, toWGS24(lon), toWGS24(lat),
toWGS24(width), toWGS24(height)); toWGS24(width), toWGS24(height));
goto error; /* mkgmap produces invalid (zero width or/and zero height) subdiv
bounds in some cases. Allow such bounds as they should not break
things. */
if (!(!width || !height))
goto error;
} }
min[0] = bounds.left(); min[0] = bounds.left();