Skip to content

Commit fdebd5b

Browse files
Fix latest commit
1 parent d7feafa commit fdebd5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/OpenStreetMap-esp32.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ std::optional<std::unique_ptr<MemoryBuffer>> OpenStreetMap::urlToBuffer(const St
378378
bool OpenStreetMap::fetchTile(CachedTile &tile, uint32_t x, uint32_t y, uint8_t zoom, String &result)
379379
{
380380
if (zoom < 1 || zoom > OSM_MAX_ZOOM)
381+
{
381382
result = "Invalid zoom level: " + String(zoom);
383+
return false;
384+
}
382385

383386
const uint32_t worldTileWidth = 1 << zoom;
384387
if (x >= worldTileWidth || y >= worldTileWidth)

0 commit comments

Comments
 (0)